forked from seiyria/jsmegahal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
59 lines (47 loc) · 1.63 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
module.exports = (grunt) ->
grunt.initConfig
pkg:
grunt.file.readJSON 'package.json'
coffee:
dist:
src: ['lib/**/*.coffee']
dest: 'dist/jsmegahal.js'
watch:
dist:
files: '<%= coffee.dist.src %>'
tasks: [ 'default' ]
test:
files: '<%= mochaTest.dist.src %>'
tasks: [ 'mochaTest' ]
mochaTest:
dist:
options:
ui: 'bdd'
reporter: 'nyan'
src:
'test/**/*.coffee'
coffeelint:
dist:
files:
src: [ 'lib/**/*.coffee', 'test/**/*.coffee' ]
options:
no_tabs: #I like using tabs!
level: 'ignore'
camel_case_classes: #Maybe I'll not break backwards compat later
level: 'ignore'
indentation:
level: 'ignore'
uglify:
dist:
files:
'dist/jsmegahal.min.js': 'dist/jsmegahal.js'
grunt.event.on 'coffee.error', (msg) ->
grunt.log.write msg
grunt.task.loadNpmTasks 'grunt-contrib-coffee'
grunt.task.loadNpmTasks 'grunt-contrib-watch'
grunt.task.loadNpmTasks 'grunt-contrib-uglify'
grunt.task.loadNpmTasks 'grunt-coffeelint'
grunt.task.loadNpmTasks 'grunt-mocha-test'
grunt.registerTask 'test', ['coffee', 'coffeelint', 'mochaTest']
grunt.registerTask 'default', ['test', 'uglify']
grunt.registerTask 'dev', ['watch']