Repository: incubator-weex Updated Branches: refs/heads/master 0557cf69f -> a5773d383
* [jsfm] using rollup.watch to fix dev build Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a5773d38 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a5773d38 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a5773d38 Branch: refs/heads/master Commit: a5773d3833ce6de9f545eadc0f14903b328579c8 Parents: 0557cf6 Author: Zhenfei You <[email protected]> Authored: Mon Jul 2 20:17:37 2018 +0800 Committer: Zhenfei You <[email protected]> Committed: Mon Jul 2 20:19:29 2018 +0800 ---------------------------------------------------------------------- build/build.js | 13 +++++++------ package.json | 1 - 2 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a5773d38/build/build.js ---------------------------------------------------------------------- diff --git a/build/build.js b/build/build.js index 4c4e530..f2c8036 100644 --- a/build/build.js +++ b/build/build.js @@ -20,7 +20,6 @@ const fs = require('fs') const path = require('path') const rollup = require('rollup') -const watch = require('rollup-watch') const getConfig = require('./config') let isWatch = false @@ -37,17 +36,19 @@ else { } function runRollupOnWatch (config) { - const watcher = watch(rollup, config) + const watcher = rollup.watch(config) watcher.on('event', event => { switch (event.code) { - case 'STARTING': console.log('checking rollup-watch version...'); break - case 'BUILD_START': console.log('bundling...'); break - case 'BUILD_END': { - console.log('bundled in ' + path.relative(process.cwd(), config.dest) + case 'START': break + case 'BUNDLE_START': console.log('bundling...'); break + case 'BUNDLE_END': { + console.log('bundled in ' + config.output.file + ' (' + event.duration + 'ms)') console.log('Watching for changes...') } break + case 'END': break case 'ERROR': console.error('ERROR: ', event.error); break + case 'FATAL': console.error('FATAL: ', event.error); break default: console.error('unknown event', event) } }) http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a5773d38/package.json ---------------------------------------------------------------------- diff --git a/package.json b/package.json index 00f37ab..8a49cc2 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,6 @@ "rollup-plugin-node-resolve": "^3.0.0", "rollup-plugin-replace": "^2.0.0", "rollup-plugin-uglify": "^2.0.1", - "rollup-watch": "^4.3.1", "selenium-server": "2.53.1", "serve": "^1.4.0", "shelljs": "^0.7.8",
