-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
80 lines (68 loc) · 1.88 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
72
73
74
75
76
77
78
79
80
coffee = require 'coffee-script'
module.exports = (grunt) ->
grunt.initConfig
clean:
build:
src: ["lib", ".cache", "tests.js.map", "tests.js"]
copy:
main:
files: [
{expand: true, cwd: 'src/', src: ['**/*.js'], dest: 'lib/'}
]
newer:
options:
cache: '.cache'
coffee:
options:
#bare: true
sourceMap: true
all:
src: ['**/*.coffee.md', '**/*.coffee']
dest: 'lib'
cwd: 'src'
#flatten: true
expand: true
ext: '.js'
mocha_debug:
options:
ui: 'bdd'
require: 'coffee-script'
#reporter: 'dot'
check: ['src/**/*.coffee', 'test/**/*.js', 'test/**/*.coffee']
all:
options:
src: ['test/**/*.coffee']
powerbuild:
options:
sourceMap: true
node: false
handlers:
'.coffee': (src, canonicalName) ->
{js, v3SourceMap} = coffee.compile src, sourceMap: true, bare: true
return {code: js, map: v3SourceMap}
watch:
options:
nospawn: true
all:
files: [
'Gruntfile.coffee'
'tasks/*.coffee'
'src/**/*.coffee'
'src/**/*.coffee.md'
'src/**/*.nools'
'src/**/*.js'
'test/*.coffee'
]
#grunt.loadTasks('tasks')
grunt.loadNpmTasks('grunt-contrib-copy')
grunt.loadNpmTasks('grunt-release')
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-newer')
grunt.loadNpmTasks('powerbuild')
grunt.registerTask('build', ['newer:coffee', 'copy'])
grunt.registerTask('rebuild', ['clean', 'build'])
grunt.registerTask('test', ['build', 'mocha_debug'])
grunt.registerTask('watch', ['watch'])
grunt.registerTask('default', ['test'])