0

So, I have installed single page app based on npm/bower/grunt/angular.js

In the root I have gruntfile.js with this code

    module.exports = function(grunt) {
    var gtx = require('gruntfile-gtx').wrap(grunt);

    gtx.loadAuto();

    var gruntConfig = require('./grunt');
    gruntConfig.package = require('./package.json');

    gtx.config(gruntConfig);

    // We need our bower components in order to develop
    gtx.alias('build:standardversion', [

        'compass:standardversion',
        ...

    ]);

    gtx.finalise();

So now I have to install grunt-cache-bust plugin from here https://github.com/hollandben/grunt-cache-bust

I installed it with npm and now I don't know where to write a task for this.

Please tell me or give me a link to understand it properly

Orange
  • 119
  • 1
  • 8

1 Answers1

0

In the directory containing GruntFile.js, create a "grunt" folder if it doesn't exist. In the "grunt" folder, create a file "cacheBust.js"

sample cacheBust.js:

module.exports = {
    assets: {
        files: { 
            src: ['index.html', 'contact.html']
        }
    }
 }

To run cacheBust from the command line: "grunt cacheBust"

Daniel Huang
  • 113
  • 1
  • 7