Browse Source

Add grunt-karma to run test in grunt

pull/1414/merge
Masayuki Tanaka 9 years ago
parent
commit
366f57ff88
  1. 12
      Gruntfile.coffee
  2. 1
      package.json

12
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']

1
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",

Loading…
Cancel
Save