felthy / grunt-cachebuster Goto Github PK
View Code? Open in Web Editor NEWGenerates a file containing file hashes
License: MIT License
Generates a file containing file hashes
License: MIT License
Hi, grunt-cachebuster is a great plugin.
I have set up grunt-cachebuster for versioning and everything worked fine. But when i'm trying to add a new js file in the list, my task cannot process to the new js file i have added.
For example:
in my cachebuster.js
var config = require('../config');
module.exports = {
build: {
options: {
banner: '<%= meta.custom_banner %>',
format: 'json'
},
files: {
'destination_path/outcome.json' : [
'source_path/jsfile1.js',
'source_path/jsfile2.js',
'source_path/jsfile3.js'
]
}
}
};
outcome.json:
{"source_path/jsfile1.js":"eefde8d058e6991e8f7b4dc8f3d7becb","source_path/jsfile2.js":"6a188e8c52885cbc5070e571d42147b9","source_path/jsfile3.js":"accb54664f7184cd0e6e7fdfc86e5243"}
When I run my grunt "grunt cachebuster", it generate the outcome.json and add all the .js files with the hash. But when I'm adding a new js file in the list here in cachebuster.js and run the task, it does not add the new js file and the hash
Would be nice to be able to specify the encryption method.
I think this is a great plugin but I am unfortunately running it on windows, which means all the paths come out with backslashes instead of forward slashes. This doesn't mesh well with the codebase running on a linux server and trying to join those paths up.
I've 'solved' this issue for myself by using a complete
function but it would be much nicer/cleaner if there was an option to force forward-slash paths.
Any chance of this being added?
Cheers
cachebuster: { files: { 'build/cachebusters.json': ['index.html'] } },
I have this config in my Gruntfile.js.
The output when I run this task is:
Running "cachebuster:files" (cachebuster) task
Done, without errors.
But no file cachebusters.json is present.
Any tips?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.