-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
54 lines (53 loc) · 1.22 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
'use strict'
module.exports = (grunt) ->
require('load-grunt-tasks') grunt
grunt.initConfig
watch:
coffee:
files: ['src/**/*.coffee', 'test/**/*.coffee', 'Gruntfile.coffee']
tasks: ['coffeelint', 'coffee', 'file_append']
coffee:
options:
sourceMap: false
sourceRoot: ''
server:
files: [{
expand: true
cwd: 'src/'
src: ['**/*.coffee']
dest: 'dist'
ext: '.js'
}, {
expand: true
cwd: 'test/'
src: ['**/*test.coffee']
dest: 'test'
ext: '.js'
}]
coffeelint:
all:
files:
src: [
'src/**/*.coffee'
'Gruntfile.coffee'
'test/**/*.coffee'
]
options:
'no_trailing_whitespace': level: 'ignore'
'max_line_length': level: 'ignore'
file_append:
default_options:
files: [{
prepend: '#!/usr/bin/env node\n//\'use strict\';\n'
input: 'dist/index.js'
output: 'dist/index.js'
}]
grunt.registerTask 'test', [
'coffeelint'
]
grunt.registerTask 'default', [
'coffeelint'
'coffee'
'file_append'
'watch'
]