-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathGruntfile.coffee
71 lines (70 loc) · 1.49 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
'use strict'
helpers = require('yeoman-generator').test
module.exports = (grunt) ->
require('load-grunt-tasks') grunt
grunt.initConfig
watch:
coffee:
files: ['src/**/*.coffee', 'test/**/*.coffee', 'Gruntfile.coffee']
tasks: ['coffeelint', 'newer:coffee']
coffee:
options:
sourceMap: false
sourceRoot: ''
server:
files: [{
expand: true
cwd: 'src/'
src: ['**/*.coffee']
dest: 'generators'
ext: '.js'
}, {
expand: true
cwd: 'test/'
src: ['**/*test.coffee']
dest: 'test'
ext: '.js'
}]
jshint:
options:
node: true
sub: true
all: [
'Gruntfile.js'
'generators/**/index.js'
]
coffeelint:
all:
files:
src: [
'src/**/*.coffee'
'Gruntfile.coffee'
'test/**/*.coffee'
]
options:
'no_trailing_whitespace': level: 'ignore'
'max_line_length': level: 'ignore'
mochaTest: test:
src: [ 'test/*.js' ]
options:
reporter: 'spec'
timeout: 120000
clean: test: files: [ {
dot: true
src: ['test/temp']
} ]
grunt.registerTask 'test', [
'clean:test'
'mochaTest'
]
grunt.registerTask 'script-test', [
'coffeelint'
'jshint'
]
grunt.registerTask 'build', [
'coffee'
'test'
]
grunt.registerTask 'default', [
'watch'
]