forked from slab/quill
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.coffee
36 lines (27 loc) · 1.48 KB
/
Gruntfile.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
_ = require('lodash')
child_process = require('child_process')
module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
grunt.initConfig(
pkg: grunt.file.readJSON('package.json')
)
require('./grunt/build')(grunt)
require('./grunt/server')(grunt)
require('./grunt/test')(grunt)
require('./grunt/watch')(grunt)
grunt.registerTask('default', ['build'])
grunt.registerTask('build', ['clean', 'browserify:quill', 'browserify:tandem', 'uglify', 'concat', 'coffee:all', 'jade', 'stylus'])
# TODO is there a better way to do this...
grunt.registerTask('dev', 'All the tasks for Quill development', ->
done = this.async()
child_process.spawn('grunt', ['watch'], { stdio: 'inherit'})
child_process.spawn('grunt', ['browserify:quill-watchify'], { stdio: 'inherit'})
child_process.spawn('grunt', ['browserify:quill-exposed-watchify'], { stdio: 'inherit'})
child_process.spawn('grunt', ['test:karma'], { stdio: 'inherit'})
child_process.spawn('grunt', ['connect:server'], { stdio: 'inherit' })
)
grunt.registerTask('test', ['karma:test'])
grunt.registerTask('test:karma', ['karma:karma'])
grunt.registerTask('test:unit', ['karma:test'])
grunt.registerTask('test:unit:remote', ['karma:remote-mac', 'karma:remote-windows', 'karma:remote-linux', 'karma:remote-mobile', 'karma:remote-legacy'])
grunt.registerTask('test:coverage', ['coffee:src', 'shell:instrument', 'browserify:quill', 'karma:coverage', 'clean:coffee', 'clean:coverage', 'browserify:quill'])