12345678910111213141516171819202122 |
- const { src, dest, series } = require('gulp');
- const del = require('del');
- const from = {
- path: [
- './assets/**/*',
- // './bower_components/**/*',(第二次以后的更新不用)
- // './index.html',(第二次以后的更新不用)
- ]
- };
- // 清理dist文件夹
- const cleanDist = async (cb) => {
- await del(['dist/**']);
- cb();
- }
- // 移动assets文件夹的内容到dist
- const moveAssets = (cb) => {
- src(from.path,{base:'./'})
- .pipe(dest('dist'));
- cb();
- }
- exports.build = series(cleanDist, moveAssets);
|