This repository has been archived by the owner on Jul 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.coffee
77 lines (62 loc) · 1.95 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
68
69
70
71
72
73
74
75
76
77
path = require "path"
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON "package.json"
uglify:
options:
banner: '/*! <%= pkg.name %> -v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> */\n'
report: 'gzip'
dist:
files:
'public/assets/application.min.js': ['public/assets/application.js']
bgShell:
runNode:
cmd: [".", "node_modules", ".bin", "supervisor --extensions \"node|js|coffee\" app server.js"].join(path.sep)
bg: true
stylus:
compile:
options:
paths: ["app/stylesheets"]
files:
"public/stylesheets/application.css": "app/stylesheets/application.styl"
concat:
options:
separator: ";"
dist:
files:
"public/assets/application.js": "public/javascripts/**/*.js"
"public/assets/application.css": "public/stylesheets/*.css"
watch:
options:
livereload: true
coffee:
files: ['app/**/client/*.coffee']
tasks: ['coffee']
css:
files: ['app/stylesheets/*.styl']
tasks: ['stylus']
clean:
controllers: ["tmp/controllers"]
coffee:
client:
options:
sourceMap: true
files: [
expand: true
cwd: "app"
src: "*/client/*.coffee"
dest: "public/javascripts"
ext: ".js"
]
grunt.loadNpmTasks "grunt-contrib-uglify"
grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks "grunt-contrib-concat"
grunt.loadNpmTasks "grunt-contrib-stylus"
grunt.loadNpmTasks "grunt-contrib-watch"
grunt.loadNpmTasks "grunt-contrib-clean"
grunt.loadNpmTasks "grunt-bg-shell"
grunt.loadNpmTasks "grunt-apidoc"
grunt.registerTask "compile", ["coffee:client", "stylus"]
grunt.registerTask "server", ["bgShell:runNode", "watch"]
grunt.registerTask "build", ["concat", "uglify"]
grunt.registerTask "default", ["compile"]