12345678910111213141516171819202122232425262728 |
- const { src, dest, series } = require('gulp');
- const del = require('del');
- const from = {
- path: [
- './css/**/*',
- './imgs/**/*',
- './js/**/*',
- './libs/**/*',
- './backgroundsize.min.htc',
- './index.html',
- './login.html',
- './PIE.htc',
- ]
- };
- // 清理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);
|