-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/parcel-bundler'
- Loading branch information
Showing
15 changed files
with
2,795 additions
and
1,890 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ npm-debug.log | |
/.nyc_output | ||
/npm | ||
/gh-pages | ||
.cache | ||
out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
import React, {} from 'react' | ||
import React from 'react' | ||
import { render } from 'react-dom' | ||
import App from './app' | ||
import App from './App' | ||
|
||
render(<App />, document.querySelector('#app')) | ||
|
||
if (module.hot) { | ||
module.hot.accept() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,52 @@ | ||
{ | ||
"name": "react-ripples", | ||
"version": "0.4.0", | ||
"description": "The ripple effect everything", | ||
"description": "The ripple effect. Ripples everything", | ||
"main": "dist/react-ripples.js", | ||
"scripts": { | ||
"dev": "webpack-dev-server --inline --hot", | ||
"build": "NODE_ENV=production node scripts/build", | ||
"build.demo": "NODE_ENV=demo webpack --progress", | ||
"dev": "NODE_ENV=development parcel dev/index.html --out-dir out", | ||
"build": "NODE_ENV=production npm-run-all --parallel build:*", | ||
"build:page": "rm -rf gh-pages && parcel build dev/index.html --no-minify --out-dir gh-pages --public-url ./", | ||
"build:lib": "rm -rf out && node scripts/build", | ||
"test": "jest --coverage" | ||
}, | ||
"keywords": [ | ||
"react", | ||
"ripple", | ||
"ripples", | ||
"effect", | ||
"button" | ||
"button", | ||
"material" | ||
], | ||
"author": "Rocky Wu <rocky823@gmail.com>", | ||
"author": "Rocky Wu <rwu823@gmail.com>", | ||
"license": "MIT", | ||
"jest": { | ||
"setupTestFrameworkScriptFile": "./scripts/jest-setup.js", | ||
"coveragePathIgnorePatterns": [ | ||
"/node_modules/", | ||
"./scripts/jest-setup" | ||
] | ||
}, | ||
"devDependencies": { | ||
"babel-loader": "^7.0.0", | ||
"babel-polyfill": "^6.23.0", | ||
"babel-preset-env": "^1.4.0", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-2": "^6.24.1", | ||
"enzyme": "^2.8.2", | ||
"babel-preset-react-app": "^3.1.0", | ||
"enzyme": "^3.2.0", | ||
"enzyme-adapter-react-16": "^1.1.0", | ||
"gulp": "^3.9.1", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-size": "^2.1.0", | ||
"gulp-uglify": "^2.1.2", | ||
"html-webpack-plugin": "^2.28.0", | ||
"jest-cli": "^19.0.2", | ||
"react-dom": "^15.5.4", | ||
"react-test-renderer": "^15.5.4", | ||
"rollup": "^0.41.6", | ||
"rollup-plugin-babel": "^2.7.1", | ||
"shelljs": "^0.7.7", | ||
"webpack": "^2.4.1", | ||
"webpack-dev-server": "^2.4.2" | ||
"gulp-uglify": "^3.0.0", | ||
"jest": "^21.2.1", | ||
"npm-run-all": "^4.1.2", | ||
"parcel-bundler": "^1.0.3", | ||
"pump": "^2.0.0", | ||
"react-dom": "^16.2.0", | ||
"rollup": "^0.52.1", | ||
"rollup-plugin-babel": "^3.0.2", | ||
"shelljs": "^0.7.8" | ||
}, | ||
"dependencies": { | ||
"prop-types": "^15.5.8", | ||
"react": "^15.5.4" | ||
"prop-types": "^15.6.0", | ||
"react": "^16.2.0" | ||
}, | ||
"repository": "https://github.com/rwu823/react-ripples.git" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
require('shelljs/global') | ||
const rollup = require('rollup') | ||
const babel = require('rollup-plugin-babel') | ||
const pkg = require('../package.json') | ||
|
||
const pump = require('pump') | ||
const gu = require('gulp') | ||
const rename = require('gulp-rename') | ||
const uglify = require('gulp-uglify') | ||
const size = require('gulp-size') | ||
|
||
rm('-rf', ['npm']) | ||
const pkg = require('../package.json') | ||
|
||
rollup.rollup({ | ||
entry: 'src/index.js', | ||
input: 'src/index.js', | ||
external: Object.keys(pkg.dependencies), | ||
plugins: [ | ||
babel(), | ||
babel() | ||
], | ||
}) | ||
.then((bundle) => { | ||
bundle.write({ | ||
format: 'umd', | ||
moduleName: 'ReactRipples', | ||
dest: `npm/${pkg.main}`, | ||
globals: { | ||
'react': 'React', | ||
} | ||
}) | ||
}) | ||
}).then((bundle) => bundle.write({ | ||
format: 'umd', | ||
name: 'ReactRipples', | ||
file: `out/${pkg.main}`, | ||
globals: { | ||
'react': 'React', | ||
'prop-types': 'PropTypes', | ||
} | ||
})) | ||
.then(() => { | ||
gu.src('package.json') | ||
.pipe(gu.dest('npm')) | ||
pump([ | ||
gu.src('package.json'), | ||
gu.dest('out'), | ||
|
||
gu.src('npm/dist/*.js') | ||
.pipe(uglify()) | ||
.pipe(rename({ | ||
gu.src('out/dist/*.js'), | ||
uglify(), | ||
rename({ | ||
suffix: '.min' | ||
})) | ||
.pipe(gu.dest('npm/dist')) | ||
.on('finish', () => { | ||
gu.src('npm/**') | ||
.pipe(size({ | ||
showFiles: true, | ||
prettySize: true, | ||
})) | ||
}), | ||
gu.dest('out/dist') | ||
], () => pump([ | ||
gu.src('out/**'), | ||
size({ | ||
showFiles: true, | ||
pretty: true, | ||
gzip: true, | ||
}) | ||
])) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Enzyme from 'enzyme' | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
|
||
Enzyme.configure({ adapter: new Adapter() }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.