feat: use rollup to build component

This commit is contained in:
陈嘉涵
2017-08-12 22:33:13 +08:00
parent 6e35dfa177
commit 4555d82c8e
13 changed files with 665 additions and 49 deletions
+12 -3
View File
@@ -11,7 +11,7 @@
"packages"
],
"scripts": {
"bootstrap": "yarn || npm i",
"bootstrap": "yarn || npm i && cd ./packages/vant-css/ && yarn || npm i && cd ../../",
"dev": "npm run build:file && webpack-dev-server --inline --config build/webpack.config.dev.js --content-base ./",
"build:file": "node build/bin/build-entry.js",
"build:utils": "cross-env BABEL_ENV=utils babel src --out-dir lib --ignore src/index.js --presets=es2015",
@@ -27,7 +27,8 @@
"test": "karma start test/unit/karma.conf.js --single-run",
"test:coverage": "open test/unit/coverage/lcov-report/index.html",
"test:watch": "karma start test/unit/karma.conf.js",
"release": "npm run bootstrap && sh build/release.sh"
"release": "npm run bootstrap && sh build/release.sh",
"rollup": "rollup -c ./build/rollup.component.config.js"
},
"repository": {
"type": "git",
@@ -53,6 +54,7 @@
"babel-cli": "^6.14.0",
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-module-resolver": "^2.7.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.15.0",
@@ -60,6 +62,7 @@
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.16.0",
"babel-runtime": "^6.25.0",
"babelrc-rollup": "^3.0.0",
"chai": "^4.1.1",
"cheerio": "^0.22.0",
"codecov": "^2.2.0",
@@ -97,6 +100,11 @@
"precss": "^2.0.0",
"progress-bar-webpack-plugin": "^1.10.0",
"rimraf": "^2.5.4",
"rollup": "^0.45.2",
"rollup-plugin-babel": "^3.0.1",
"rollup-plugin-commonjs": "^8.1.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-vue": "^2.4.1",
"run-sequence": "^2.1.0",
"sinon": "^2.4.1",
"sinon-chai": "^2.12.0",
@@ -115,6 +123,7 @@
"webpack": "^3.5.1",
"webpack-dev-server": "^2.7.1",
"webpack-merge": "^4.1.0",
"zan-doc": "0.1.12"
"zan-doc": "0.1.12",
"zan-rollup-plugin-alias": "1.0.1"
}
}