/
Gruntfile.coffee
46 lines (43 loc) · 1.04 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
module.exports = (grunt)->
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.registerTask 'default', ['watch']
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
watch:
coffee_lib:
files: ['coffee_lib/**/*.coffee']
tasks: ['coffeelint:lib', 'coffee:lib']
uglify_lib:
files: ['lib/**/*.js']
tasks: ['uglify:lib']
coffee:
lib:
files: [
expand: true
cwd: 'coffee_lib/'
src: ['**/*.coffee']
dest: 'lib/'
ext: '.js'
]
uglify:
lib:
options:
preserveComments: "some"
files: [
expand: true
cwd: 'lib/'
src: '**/*.js'
dest: 'lib/'
ext: '.js'
]
coffeelint:
lib:
files:
src: ['coffee_lib/**/*.coffee']
options:
max_line_length:
level: 'warn'
return