-
Notifications
You must be signed in to change notification settings - Fork 7
/
Gruntfile.coffee
60 lines (57 loc) · 1.89 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
coffee:
compile:
options:
join: true
sourceMap: false
files:
'app/assets/javascripts/dest/src.js' : 'app/assets/javascripts/src/**/*.coffee'
coffeelint:
compile:
options:
max_line_length:
level: "ignore"
no_trailing_whitespace:
level: "ignore"
indentation:
level: "ignore"
files:
'app/assets/javascripts/dest/src.js' : 'app/assets/javascripts/src/**/*.coffee'
haml:
options:
language: 'coffee'
target: 'js'
includePath: true
pathRelativeTo: "app/assets/javascripts/src/templates"
namespace: "window.JST"
bare: true
dependencies:
$: 'jquery'
_: 'underscore',
App: 'App'
customHtmlEscape: 'HAML.escape'
customCleanValue: 'HAML.cleanValue'
customPreserve: 'HAML.preserve'
customFindAndPreserve: 'HAML.findAndPreserve'
customSurround: 'HAML.surround'
customSucceed: 'HAML.succeed'
customPrecede: 'HAML.precede'
customReference: 'HAML.reference'
compile:
files:
'app/assets/javascripts/dest/0_templates.js' : 'app/assets/javascripts/src/templates/**/*.hamlc'
concat:
compile:
files:
'app/assets/javascripts/app.js' : ['app/assets/javascripts/src/lib/*.js','app/assets/javascripts/dest/*.js']
watch:
files: ['app/assets/javascripts/src/**/*.*']
tasks: ['coffeelint','coffee','concat']
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-haml'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.registerTask 'default', ['coffee','concat']