Skip to content

Commit

Permalink
* [html5] modify the build script of vue renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanks10100 committed Dec 18, 2016
1 parent bba11db commit 9905211
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ function buildVue () {
format: 'umd',
plugins: [
eslint(),
postcss(),
nodeResolve({
jsnext: true,
main: true
Expand Down
30 changes: 30 additions & 0 deletions build/rollup.vue.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { rollup } from 'rollup'
import eslint from 'rollup-plugin-eslint'
import postcss from 'rollup-plugin-postcss'
import replace from 'rollup-plugin-replace'
import nodeResolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import buble from 'rollup-plugin-buble'

export default {
moduleName: 'VueRenderer',
entry: './html5/render/vue/index.js',
dest: './dist/vue-renderer.js',
format: 'umd',
sourceMap: 'inline',
plugins: [
eslint(),
postcss(),
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
'process.env.VUE_ENV': JSON.stringify('weex'),
'process.env.NODE_DEBUG': false
}),
nodeResolve({
jsnext: true,
main: true
}),
commonjs(),
buble()
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"dist": "npm run dist:browser",
"dev:native": "rollup -w -c build/rollup.config.js",
"dev:browser": "rollup -w -c build/rollup.browser.config.js",
"dev:vue": "NODE_ENV=development webpack --watch --config build/webpack.vue.config.js",
"dev:vue": "NODE_ENV=development rollup -w -c build/rollup.vue.config.js",
"dev:examples": "webpack --watch --config build/webpack.examples.config.js",
"dev:test": "webpack --watch --config build/webpack.test.config.js",
"lint": "eslint html5",
Expand Down

0 comments on commit 9905211

Please sign in to comment.