1
0
mirror of https://gitee.com/bitdance-team/chrome-extension synced 2025-01-10 21:58:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
chrome-extension/packages/services/gulpfile.js
2022-02-09 11:48:23 +08:00

39 lines
818 B
JavaScript

const {src,dest,parallel,watch,series} = require('gulp');
const ts = require('gulp-typescript');
const tsProject = ts.createProject("tsconfig.app.json");
const shell = require('gulp-shell');
const nodemon = require('gulp-nodemon');
function buildTs () {
return src('./src/**/*.ts')
.pipe(tsProject())
.pipe(dest('./dist'));
}
function start (done) {
nodemon({
exec: 'inspirecloud dev',
ext: 'js,ts',
ignore: './dist',
delay: 50,
tasks: ['buildTs'],
done
})
}
function watchServe () {
return watch('src/**/*.ts', {
delay: 100
}, series(buildTs))
}
function serve () {
return series(buildTs, start)()
}
function deploy () {
return series(buildTs, shell.task('inspirecloud deploy'))()
}
module.exports = {serve,deploy,buildTs}