mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 23:08:08 +08:00
Add watch task
This commit is contained in:
parent
395ad8e035
commit
19d3b559da
4 changed files with 18 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -54,6 +54,8 @@ rl-compile:
|
|||
@docker-compose run --no-deps --rm node gulp build
|
||||
rl-compile-with-source:
|
||||
@docker-compose run --no-deps --rm node gulp build --source
|
||||
rl-watch-css:
|
||||
@docker-compose run --no-deps --rm node npm run watch-css
|
||||
rl-watch-js:
|
||||
@docker-compose run --no-deps --rm node npm run watch-js
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ const { assets } = require('./tasks/assets');
|
|||
const { js, jsLint } = require('./tasks/js');
|
||||
const { css, cssLint } = require('./tasks/css');
|
||||
const { vendors } = require('./tasks/vendors');
|
||||
const { watchCss } = require('./tasks/watch');
|
||||
const { rainloop } = require('./tasks/rainloop');
|
||||
const { owncloud } = require('./tasks/owncloud');
|
||||
|
||||
|
@ -23,6 +24,8 @@ exports.lint = lint;
|
|||
exports.build = build;
|
||||
exports.default = build;
|
||||
|
||||
exports.watchCss = watchCss;
|
||||
|
||||
exports.rainloop = gulp.series(build, rainloop);
|
||||
exports.owncloud = gulp.series(build, owncloud);
|
||||
exports.all = gulp.series(exports.rainloop, exports.owncloud);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"url": "git://github.com/RainLoop/rainloop-webmail.git"
|
||||
},
|
||||
"scripts": {
|
||||
"watch-css": "gulp watch",
|
||||
"watch-css": "gulp watchCss",
|
||||
"watch-js": "webpack --color --watch"
|
||||
},
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
|
|
12
tasks/watch.js
Normal file
12
tasks/watch.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL 3 */
|
||||
const gulp = require('gulp');
|
||||
|
||||
const { config } = require('./config');
|
||||
const { cssBuild } = require('./css');
|
||||
|
||||
const watchCss = gulp.series(cssBuild, (cb) => {
|
||||
gulp.watch(config.paths.less.main.watch, { interval: config.watchInterval }, cssBuild);
|
||||
cb();
|
||||
});
|
||||
|
||||
exports.watchCss = watchCss;
|
Loading…
Reference in a new issue