Skip to content

Commit

Permalink
remove vue.common.js (just use umd build)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 25, 2015
1 parent 8609d4a commit 599e38e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9,458 deletions.
37 changes: 9 additions & 28 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,27 @@ var main = fs
.replace(/Vue\.version = '[\d\.]+'/, "Vue.version = '" + version + "'")
fs.writeFileSync('src/index.js', main)

// CommonJS build.
// this is used as the "main" field in package.json
// and used by bundlers like Webpack and Browserify.
// Dev build
rollup.rollup({
entry: 'src/index.js',
plugins: [
replace({
'process.env.NODE_ENV': "'development'"
}),
babel({
loose: 'all'
})
]
})
.then(function (bundle) {
return write('dist/vue.common.js', bundle.generate({
format: 'cjs',
banner: banner
return write('dist/vue.js', bundle.generate({
format: 'umd',
banner: banner,
moduleName: 'Vue'
}).code)
})
// Standalone Dev Build
.then(function () {
return rollup.rollup({
entry: 'src/index.js',
plugins: [
replace({
'process.env.NODE_ENV': "'development'"
}),
babel({
loose: 'all'
})
]
})
.then(function (bundle) {
return write('dist/vue.js', bundle.generate({
format: 'umd',
banner: banner,
moduleName: 'Vue'
}).code)
})
})
.then(function () {
// Standalone Production Build
// Production build
return rollup.rollup({
entry: 'src/index.js',
plugins: [
Expand Down
Loading

0 comments on commit 599e38e

Please sign in to comment.