1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| var gulp = require('gulp'); var rename = require("gulp-rename");
gulp.task('name', function() { return gulp.src('./dist/**/*') .pipe(rename(function(path) { console.log(path) var name = new Date().getTime(); path.basename = name; })) .pipe(gulp.dest('rename/')) })
gulp.task('name2', function() { return gulp.src('./dist/**/*') .pipe(rename({ dirname: "main", basename: "dong", prefix: "", suffix: "", extname: "" })) .pipe(gulp.dest('rename/')) })
|