Commit 3ebfd9e0 authored by rockyl's avatar rockyl

增加livereload

parent 21f8ebab
......@@ -8,6 +8,7 @@ const {uglify} = require('rollup-plugin-uglify');
const resolve = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');
const typescript = require('rollup-plugin-typescript2');
const livereload = require('gulp-livereload');
let currentMode = 'debug';
let version, releasePath;
......@@ -51,9 +52,19 @@ gulp.task('compileTs', async function () {
plugins,
});
await bundle.write(writeConfig);
gulp.start(['reload']);
});
gulp.task('reload', function () {
gulp.src(['debug/**/*.js'])
.pipe(livereload());
});
gulp.task('watch', function () {
livereload.listen({
quiet: true,
});
gulp.watch('src/**', ['compile']);
});
......
This diff is collapsed.
......@@ -5,6 +5,7 @@
"license": "MIT",
"dependencies": {
"gulp": "^3.9.1",
"gulp-livereload": "^4.0.1",
"rollup": "^0.66.6",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^3.4.0",
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment