diff --git a/package.json b/package.json index b295d0b..d3c4384 100644 --- a/package.json +++ b/package.json @@ -41,12 +41,12 @@ ], "license": "BSD", "devDependencies": { - "grunt-contrib-jshint": "~0.6.4", - "grunt-contrib-watch": "~0.1.4", - "grunt": "~0.4.1", - "grunt-contrib-jasmine": "~0.6", - "grunt-contrib-connect": "~0.2.0", - "grunt-bump": "0.0.13", + "grunt-contrib-jshint": "~1.0.0", + "grunt-contrib-watch": "~1.0.0", + "grunt": "~1.0.0", + "grunt-contrib-jasmine": "~1.0.3", + "grunt-contrib-connect": "~1.0.2", + "grunt-bump": "0.8.0", "grunt-npm": "0.0.2" } } diff --git a/src/template-jasmine-requirejs.js b/src/template-jasmine-requirejs.js index 3b72f46..f1b1925 100644 --- a/src/template-jasmine-requirejs.js +++ b/src/template-jasmine-requirejs.js @@ -65,7 +65,9 @@ function moveRequireJs(grunt, task, versionOrPath) { exports.process = function(grunt, task, context) { - var version = context.options.version; + var version = context.options.version, + // Support Lodash pre-v3 and post-v3 + contains = grunt.util._.contains || grunt.util._.includes; // find the latest version if none given if (!version) { @@ -84,7 +86,7 @@ exports.process = function(grunt, task, context) { return path.normalize(configFile); }); context.scripts.src = grunt.util._.reject(context.scripts.src, function (script) { - return grunt.util._.contains(normalizedPaths, path.normalize(script)); + return contains(normalizedPaths, path.normalize(script)); }); var configFromFiles = {}; @@ -173,5 +175,5 @@ exports.process = function(grunt, task, context) { context.temp); var source = grunt.file.read(template); - return grunt.util._.template(source, context); + return grunt.util._.template(source)(context); };