const SRC = 'src/*.js';
const DEST = 'dist';
gulp.task('default', () => {
return gulp.src(SRC)
.pipe(changed(DEST))
.pipe(gulp.dest(DEST))
.pipe( /* 其他操作 */ );
});
gulp.task('default', () => {
return gulp.src('src/*.js')
.pipe(changed())
.pipe( /* 其他操作 */ );
});
gulp.task('default', () => {
return gulp.src(SRC)
.pipe(changed(DEST, {hasChanged: changed.compareSha1Digest}))
.pipe(gulp.dest(DEST))
.pipe( /* 其他操作 */ );
});
function compareLastModifiedTime(stream, cb, sourceFile, targetPath) {
// 获取目标文件的状态
fs.stat(targetPath, function (err, targetStat) {
// 若源文件存在
if (!fsOperationFailed(stream, sourceFile, err)) {
// 对比两者的最后修改时间
if (sourceFile.stat.mtime > targetStat.mtime) {
stream.push(sourceFile);
}
}
cb();
});
}
$ stat gulpfile.js File: ‘gulpfile.js' Size: 2676 Blocks: 4 IO Block: 65536 regular file Device: d6be5777h/3602798455d Inode: 844424930178810 Links: 1 Access: (0644/-rw-r--r--) Uid: (1435492/root) Gid: (1049089/ UNKNOWN) Access: 2015-11-24 09:18:34.008292400 +0000 Modify: 2016-01-20 03:06:34.035859700 +0000 Change: 2016-01-20 07:04:40.432046400 +0000 Birth: 2015-11-24 09:18:33.965292400 +0000
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有