Search code examples
backbone.jsgruntjsbackbone-boilerplate

Adding additional plugins to BBB's grunt file


I inherited a project that uses BBB (Backbone Boilerplate Buddy).

I am trying to modify the grunt file by adding this particular task that I noticed wasn't included in BBB. The following code is a snippet of the grunt-rev options. But when I

rev: {
    options: {
      algorithm: 'md5',
      length: 8
    },
    files: {
        src: ['../webapp/webapp.js']
      }
  },

grunt.loadNpmTasks('grunt-rev');

grunt.registerTask("debug", "rev");

Unfortunately, when I run the the bbb command from Maven, it always says it can't find the grunt-rev plugin. It has been installed globally on the machine by the way.


Solution

  • It shouldn't be installed globally, but locally. Try npm install --save-dev grunt-rev.