hapimini-cli
Version:
19 lines • 987 B
JavaScript
const gulp = require("gulp")
const path = require("path")
const SLGulp = require("./../sl-miniapp/.build/gulp.tasks")
gulp.task('clean', SLGulp.clean)
gulp.task('less:compile', SLGulp.lessCompile)
gulp.task('axml:compile', SLGulp.axmlCompile)
gulp.task('json:compile', SLGulp.jsonCompile)
gulp.task('assets:compile', SLGulp.assetsCompile)
gulp.task('static:compile', SLGulp.staticCompile)
gulp.task('js:compile', SLGulp.jsCompile)
gulp.task("build:compile", gulp.series(SLGulp.clean, gulp.parallel(["less:compile", "axml:compile", "json:compile", "assets:compile", "js:compile", "static:compile"])))
gulp.task('server:watch', gulp.series('build:compile', function () {
const { imSrc, lDirs, aDirs, JDirs, jDirs } = SLGulp.getWatchConf()
gulp.watch(imSrc, gulp.series("assets:compile"))
gulp.watch(lDirs, gulp.series('less:compile'))
gulp.watch(aDirs, gulp.series('axml:compile'))
gulp.watch(JDirs, gulp.series('json:compile'))
gulp.watch(jDirs, gulp.series('js:compile'))
}))