-
Notifications
You must be signed in to change notification settings - Fork 12
/
Gruntfile.coffee
67 lines (66 loc) · 2 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
61
62
63
64
65
66
67
###
grunt-peon-gui
Creates a local webserver GUI tool to run Grunt tasks
Copyright (c) 2013 Mark Parolisi, contributors
Licensed under the MIT license.
###
module.exports = (grunt) ->
grunt.initConfig(
compass:
app:
options:
sassDir: "app/sass"
cssDir: "app/assets/css"
coffee:
app:
files:
"app/assets/js/lib/peon-gui.js": "app/coffee/peon-gui.coffee"
jshint:
app: [
"Gruntfile.js"
"app/js/*.js"
"<%= nodeunit.tests %>"
]
coffeelint:
app: ["lib/*.coffee", "tasks/*.coffee"]
nodeunit:
tests: ["tests/*_test.js"]
uglify:
app:
files:
'app/assets/js/lib.min.js': [
'app/assets/js/lib/vendor/jquery.js'
'app/assets/js/lib/vendor/lodash.js'
'app/assets/js/lib/vendor/bootstrap.js'
'app/assets/js/lib/vendor/pretty-json.js'
'app/assets/js/lib/templates.js'
'app/assets/js/lib/peon-gui.js'
'app/assets/js/lib/ui.js'
]
watch:
app:
files: ["**/*.coffee", "**/*.scss"]
tasks: ["default"]
options:
nospawn: true
jst:
compile:
options:
namespace: "guiTmpls"
processName: (filename) ->
return filename.split('.')[0].split('/').pop().split('.').shift().replace(/-([a-z])/g, (g)->
return g[1].toUpperCase()
)
files:
"app/assets/js/lib/templates.js": ["app/assets/tmpl/**/*.ejs"]
)
grunt.loadTasks("tasks")
grunt.loadNpmTasks("grunt-contrib-jshint")
grunt.loadNpmTasks("grunt-contrib-compass")
grunt.loadNpmTasks("grunt-contrib-coffee")
grunt.loadNpmTasks("grunt-contrib-watch")
grunt.loadNpmTasks("grunt-coffeelint")
grunt.loadNpmTasks("grunt-contrib-nodeunit")
grunt.loadNpmTasks("grunt-contrib-jst")
grunt.loadNpmTasks("grunt-contrib-uglify")
grunt.registerTask("default", ["coffeelint", "coffee", "compass", "jshint", "nodeunit", "jst", "uglify"])