加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gulpfile.js 1.47 KB
一键复制 编辑 原始数据 按行查看 历史
林中静月下仙 提交于 2021-12-01 16:12 . 文件替换
'use strict';
const gulp = require('gulp');
const $ = require('./build-system/util');
const requireDir = require('require-dir');
requireDir('./build-system');
gulp.task('help', cb => {
$.util.log(
`
Usage
gulp [TASK] [OPTIONS...]
Available tasks
build Builds the app.
build:app-css Builds the app style.
build:app-js Builds the app scripts.
build:extra Builds extra files.
build:images Builds the app style.
build:lib-css Builds the lib style.
build:lib-js Builds the lib scripts.
clean Cleans files.
clean:dist Cleans dist files.
default
dist Dist the app.
dist:all Copy all to dist.
dist:css Compress css to dist.
dist:html Compress html to dist.
dist:images Compress images to dist.
dist:js Compress js to dist.
help Display this help text.
lint Lint JS files.
server Starts a HTTP(s) server for debug.
watch Watches for changes in files.
`
);
cb();
});
// Run tasks: lint, build, docs, watch, server
gulp.task('default', cb => {
$.util.log(
$.util.colors.green('Building and watching for changes ...')
);
gulp.series(
'lint',
'build:extra', 'build:images', 'build:app-css', 'build:lib-js', 'build:lib-css', 'watch', 'server', () => {
$.util.log(
$.util.colors.green('Ready! Run "gulp help" for more build command usages.'), '\n'
);
})(cb);
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化