Generate a file which manages file's versions.
This plugin requires Grunt >=1.0.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-cache-manage --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-cache-manage');
In your project's Gruntfile, add a section named cache_manage
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
cache_manage: {
main: {
options: {
algorithm: 'md5',
encoding: 'utf8'
},
files: {
'samplemainjs': 'sample-main.js'
},
template: 'sample-mustache-template.txt', // mustache template file.
dest: 'sample-dest.txt' // output file.
}
}
});
Type: String
Default value: 'md5'
Type: String
Default value: 'utf8'
grunt.initConfig({
cache_manage: {
options: {},
files: {
'key_name': 'path/to/file',
},
template: 'path/to/template/file',
dest: 'path/to/dest/file'
}
});
grunt.initConfig({
cache_manage: {
options: {
algorithm: 'sha1',
encoding: 'utf16le',
},
files: {
'key_name': 'path/to/file',
},
template: 'path/to/template/file',
dest: 'path/to/dest/file'
}
});
date | version | description |
---|---|---|
2019-02-28 | v0.3.1 | Fix dependencies vulnerabilities ( #6 ) |
2018-10-11 | v0.3.0 | Fix dependencies vulnerabilities ( #5 ) |
2018-04-28 | v0.2.0 | Updated dependencies. ( #4 ) |
2018-01-26 | v0.1.3 | Print error detail when failed hashing. ( #2 ) |
2014-10-30 | v0.1.0 | First release. |