在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Dragory/gulp-hash开源软件地址(OpenSource Url):https://github.com/Dragory/gulp-hash开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-hashCachebust your assets by adding a hash to the filename
Basic usagevar hash = require('gulp-hash');
gulp.src('./js/**/*.js')
.pipe(hash()) // Add hashes to the files' names
.pipe(gulp.dest('public/js')) // Write the renamed files
.pipe(hash.manifest('public/assets.json', { // Generate the manifest file
deleteOld: true,
sourceDir: __dirname + '/public/js'
}))
.pipe(gulp.dest('.')); // Write the manifest file (see note below) The "manifest" is a JSON file that maps the original filenames to the renamed ones. Note: It is recommended to use the full relative path to the manifest file in StreamingThe plugin fully supports both buffers and streams. If you encounter any problems, please open an issue on GitHub and I'll look into it! APIhash(options)
hash.manifest(manifestPath, options)
hash.manifest(manifestPath, append, space)
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论