diff --git a/Gruntfile.js b/Gruntfile.js index cf9a894..2ef5d62 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -3,7 +3,7 @@ module.exports = function(grunt) { grunt.initConfig({ jshint: { - files: ["lscache.js"], + files: ["lscache.js", "./tests/tests.js"], }, uglify: { dist: { @@ -19,13 +19,28 @@ module.exports = function(grunt) { tagName: '%VERSION%', push: false } + }, + browserify: { + app: { + src: ["./tests/tests.js"], + dest: "./tests/tests-cjs.js", + options: { + shim: { + qunit: { + path: "./tests/qunit.js", + exports: 'qunit' + } + } + } + } } }); grunt.loadNpmTasks("grunt-contrib-uglify"); grunt.loadNpmTasks("grunt-contrib-jshint"); grunt.loadNpmTasks('grunt-bump'); + grunt.loadNpmTasks('grunt-browserify'); - grunt.registerTask("default", ["jshint", "uglify"]); + grunt.registerTask("default", ["jshint", "uglify", "browserify"]); }; diff --git a/package.json b/package.json index 696b692..3b30b0e 100755 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "grunt-cli": "~0.1.13", "grunt-contrib-jshint": "~0.8.0", "grunt-contrib-uglify": "~0.3.0", - "grunt-bump": "0.0.13" + "grunt-bump": "0.0.13", + "grunt-browserify": "1.3.x" } }