Skip to content

Commit

Permalink
feat: update rollup and babel
Browse files Browse the repository at this point in the history
  • Loading branch information
chungchiehlun committed May 7, 2020
1 parent 04fd605 commit 92f8e05
Show file tree
Hide file tree
Showing 8 changed files with 3,363 additions and 4,680 deletions.
13 changes: 0 additions & 13 deletions .babelrc

This file was deleted.

14 changes: 0 additions & 14 deletions devContent/index.html

This file was deleted.

13 changes: 0 additions & 13 deletions devContent/main.css

This file was deleted.

43 changes: 0 additions & 43 deletions devContent/main.js

This file was deleted.

32 changes: 11 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"module": "dist/index.esm.js",
"browser": "dist/index.umd.js",
"scripts": {
"dev": "rollup -c --watch",
"bundle": "rollup -c",
"build": "rollup -c",
"test": "jest"
},
"husky": {
Expand Down Expand Up @@ -38,39 +37,30 @@
"dist"
],
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/core": "^7.9.6",
"@babel/plugin-external-helpers": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.4.2",
"babel-loader": "^8.0.0",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/preset-env": "^7.9.6",
"@babel/preset-react": "^7.9.4",
"@rollup/plugin-babel": "^5.0.0",
"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-node-resolve": "^7.1.3",
"@rollup/plugin-replace": "^2.3.2",
"cross-spawn": "^5.1.0",
"css-loader": "^0.28.7",
"enzyme": "^3.5.0",
"enzyme-adapter-react-16": "^1.3.1",
"enzyme-to-json": "^3.3.4",
"husky": "^1.0.0-rc.14",
"jest": "^23.5.0",
"lint-staged": "^7.2.2",
"postcss-loader": "^2.0.8",
"postcss-nested": "^4.1.0",
"postcss-preset-env": "^5.3.0",
"prettier": "^1.7.4",
"react": "^16.5.1",
"react-dom": "^16.5.1",
"react-test-renderer": "^16.4.2",
"rollup": "^0.66.0",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-commonjs": "^9.1.8",
"rollup-plugin-node-globals": "^1.1.0",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-postcss": "^1.6.2",
"rollup-plugin-replace": "^2.0.0",
"style-loader": "^0.19.0",
"webpack": "^3.8.1",
"webpack-dev-server": "^2.9.3"
"rollup": "^2.8.2",
"rollup-plugin-postcss": "^3.1.1"
},
"dependencies": {
"classnames": "^2.2.6",
Expand Down
21 changes: 6 additions & 15 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
import rollup from "rollup";
import babel from "rollup-plugin-babel";
import babel from "@rollup/plugin-babel";
import postcss from "rollup-plugin-postcss";
import postcssPresetEnv from "postcss-preset-env";
import postcssNested from "postcss-nested";
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import replace from "rollup-plugin-replace";
import spawn from "cross-spawn";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import replace from "@rollup/plugin-replace";
import pkg from "./package.json";

const watcher = rollup.watch({});

watcher.on("event", event => {
if (event.code === "START") {
spawn("webpack-dev-server", { stdio: "inherit" });
}
});

const babelOptions = {
babelrc: false,
exclude: "node_modules/**",
Expand All @@ -29,7 +19,8 @@ const babelOptions = {
],
"@babel/react"
],
plugins: ["@babel/proposal-class-properties"]
plugins: ["@babel/proposal-class-properties"],
exclude: "node_modules/**"
};

const postcssOptions = {
Expand Down
56 changes: 0 additions & 56 deletions webpack.config.js

This file was deleted.

Loading

0 comments on commit 92f8e05

Please sign in to comment.