From 6f49a9c72984f93f77205641346cc279b4e542cb Mon Sep 17 00:00:00 2001 From: Rocky Wu Date: Fri, 8 Dec 2017 18:20:04 +0800 Subject: [PATCH 1/3] Refactor - Change bundle tool to `parcel-bundler` - Upgrade to React ~16 --- .babelrc | 14 +- .gitignore | 2 + .travis.yml | 6 +- README.md | 14 +- dev/{app.js => App.js} | 0 dev/index.html | 2 + dev/index.js | 8 +- package.json | 53 +- scripts/build.js | 58 +- scripts/deploy.js | 4 +- scripts/jest-setup.js | 4 + src/__tests__/react-ripples.spec.js | 3 +- src/index.js | 65 +- webpack.config.js | 60 - yarn.lock | 4369 ++++++++++++++++----------- 15 files changed, 2774 insertions(+), 1888 deletions(-) rename dev/{app.js => App.js} (100%) create mode 100644 scripts/jest-setup.js delete mode 100644 webpack.config.js diff --git a/.babelrc b/.babelrc index e9feb92..35f5159 100644 --- a/.babelrc +++ b/.babelrc @@ -3,18 +3,6 @@ ["env", { "modules": false }], - "stage-2", - "react", - ], - "env": { - "test": { - "presets": [ - "env", - "stage-2", - "react" - ] - } - }, - "plugins": [ + "react-app" ] } diff --git a/.gitignore b/.gitignore index 37b6dbe..8f70d20 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ npm-debug.log /.nyc_output /npm /gh-pages +.cache +out diff --git a/.travis.yml b/.travis.yml index 7f8755e..7431649 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,14 @@ language: node_js node_js: - - v7 + - v8 env: global: matrix: - TRAVIS_MATRIX=test - - TRAVIS_MATRIX=build - - TRAVIS_MATRIX=build.demo + - TRAVIS_MATRIX=build:page + - TRAVIS_MATRIX=build:lib script: - npm run $TRAVIS_MATRIX diff --git a/README.md b/README.md index 01b6693..4743e66 100644 --- a/README.md +++ b/README.md @@ -7,30 +7,24 @@ $ npm install --save react-ripples ``` - - ## Demo [live demo](https://rwu823.github.io/react-ripples) - ## Usage ```javascript import Ripples from 'react-ripples' - + render() { -
- - - -
+ + + } ``` - ## API ### Props diff --git a/dev/app.js b/dev/App.js similarity index 100% rename from dev/app.js rename to dev/App.js diff --git a/dev/index.html b/dev/index.html index bc3f8bd..d8c2fb8 100644 --- a/dev/index.html +++ b/dev/index.html @@ -98,6 +98,8 @@

React Ripples

+ +