diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 1256ee1..5591182 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -1,5 +1,5 @@ module.exports = (grunt) -> - require('load-grunt-tasks') grunt, pattern: ['grunt-contrib-*', 'grunt-sass'] + require('load-grunt-tasks') grunt, pattern: ['grunt-contrib-*', 'grunt-sass', 'grunt-karma'] grunt.initConfig watch: @@ -85,6 +85,10 @@ module.exports = (grunt) -> options: jshintrc: '.jshintrc' + karma: + unit: + configFile: 'karma.conf.js' + uglify: c3: files: @@ -103,5 +107,7 @@ module.exports = (grunt) -> 'c3.css': 'src/scss/main.scss' grunt.registerTask 'lint', ['jshint'] - grunt.registerTask 'build', ['concat', 'sass', 'cssmin', 'uglify'] - grunt.registerTask 'defualt', ['lint', 'build'] + grunt.registerTask 'test', ['karma'] + grunt.registerTask 'build', ['concat', 'sass'] + grunt.registerTask 'minify', ['cssmin', 'uglify'] + grunt.registerTask 'default', ['lint', 'build', 'test', 'minify'] diff --git a/package.json b/package.json index 7167840..8f8314e 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-uglify": "~0.4.0", "grunt-contrib-watch": "^0.6.1", + "grunt-karma": "^0.12.1", "grunt-sass": "^0.17.0", "jasmine-core": "^2.3.4", "karma": "^0.13.10",