snappymail/gulpfile.js

32 lines
1,015 B
JavaScript
Raw Normal View History

2018-02-27 06:59:21 +08:00
/* RainLoop Webmail (c) RainLoop Team | Licensed under AGPL 3 */
2019-06-29 22:16:09 +08:00
const gulp = require('gulp');
2018-02-27 06:59:21 +08:00
2019-07-05 03:09:27 +08:00
const { cleanStatic } = require('./tasks/common');
const { assets } = require('./tasks/assets');
const { js, jsLint } = require('./tasks/js');
const { css, cssLint } = require('./tasks/css');
const { vendors } = require('./tasks/vendors');
2019-07-05 04:35:53 +08:00
const { watchCss } = require('./tasks/watch');
2019-07-05 03:09:27 +08:00
const { rainloop } = require('./tasks/rainloop');
const { owncloud } = require('./tasks/owncloud');
2018-02-27 06:59:21 +08:00
2019-06-29 22:16:09 +08:00
const clean = gulp.series(cleanStatic);
2018-02-27 06:59:21 +08:00
2019-06-29 22:16:09 +08:00
const lint = gulp.parallel(jsLint, cssLint);
2018-02-27 06:59:21 +08:00
2019-06-29 22:16:09 +08:00
const buildState1 = gulp.parallel(js, css, vendors);
const buildState2 = gulp.series(clean, assets, buildState1);
2018-02-27 06:59:21 +08:00
2019-06-29 22:16:09 +08:00
const build = gulp.parallel(lint, buildState2);
2018-02-27 06:59:21 +08:00
2019-07-05 03:09:27 +08:00
exports.css = css;
2019-06-29 22:16:09 +08:00
exports.lint = lint;
exports.build = build;
2019-07-05 03:09:27 +08:00
exports.default = build;
2018-02-27 06:59:21 +08:00
2019-07-05 04:35:53 +08:00
exports.watchCss = watchCss;
2019-06-29 22:16:09 +08:00
exports.rainloop = gulp.series(build, rainloop);
exports.owncloud = gulp.series(build, owncloud);
exports.all = gulp.series(exports.rainloop, exports.owncloud);