forked from klacointe/backbone.rails-forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
53 lines (50 loc) · 1.36 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
module.exports = (grunt)->
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-mocha'
grunt.loadNpmTasks 'grunt-bower-task'
grunt.initConfig
coffeelint:
app:
files:
src: ['Gruntfile.coffee', 'src/js/*/**.coffee', 'test/**/*.coffee']
options:
max_line_length:
level: 'warn'
no_backticks:
level: 'warn'
jshint:
manifest: ['*.json']
coffee:
assets:
options:
join: true
files:
'dist/js/backbone.rails-forms.js': [
'src/js/namespace.coffee',
'src/js/csrf_token.coffee',
'src/js/ajax_form.coffee',
'src/js/backbone_form.coffee'
]
test:
expand: true
flatten: true
cwd: 'test/src/'
src: ['**/*.coffee']
dest: 'test/dist/js'
ext: '.js'
mocha:
options:
run: true
test:
src: ['test/**/*.html']
watch:
files: ['src/**/*.coffee', 'test/**/*.coffee']
tasks: ['coffeelint', 'coffee', 'mocha']
bower:
install:
targetDir: 'bower_components'
copy: no
grunt.registerTask 'default', ['bower', 'jshint', 'coffeelint', 'coffee', 'mocha']