-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathGruntfile.coffee
More file actions
93 lines (80 loc) · 2.87 KB
/
Gruntfile.coffee
File metadata and controls
93 lines (80 loc) · 2.87 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
module.exports = (grunt)->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
coffee:
# compileWithMaps:
# options:
# sourceMap: true
compile:
files:
'server.js': 'src/coffee/node/server.coffee' # 1:1 compile server file
'app/js/app.js': ['src/coffee/angular/*.coffee'] # concat then compile angular js into single file
concurrent:
server_watch: ['nodemon', 'watch']
test_server: ['exec:start_test_server', 'karma']
exec:
start_test_server:
cmd: 'node scripts/web-server.js'
notify:
cmd: 'echo Server started at http://localhost:4000. Activate your LiveReload extension!'
karma:
e2e:
configFile: 'config/karma-e2e.conf.js'
# autoWatch: true
unit:
configFile: 'config/karma.conf.js'
singleRun: true
nodemon:
server:
dev: {} # runs file in main property of package.json
stylus:
compile:
files:
'app/css/app.css': 'src/stylus/app.styl' # 1:1 compile
'app/css/bootstrap.css': 'src/stylus/bootstrap/bootstrap.styl' # 1:1 compile
'app/css/responsive.css': 'src/stylus/bootstrap/responsive.styl' # 1:1 compile
watch:
coffee:
files: ['src/coffee/angular/*', 'src/coffee/node/*']
tasks: ['coffee']
options:
livereload: true # default port 35729
mycss:
files: ['src/stylus/*', 'src/stylus/bootstrap/*']
tasks: ['stylus']
options:
livereload: true # default port 35729
html:
files: ['app/*.html', 'app/partials/*.html', 'app/img/*.*']
options:
livereload: true # default port 35729
# uglify:
# options:
# banner: '/*! <%= pkg.name %> <%= pkg.version %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
# dist:
# files:
# 'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
# qunit:
# files: ['test/**/*.html']
# jshint:
# files: ['gruntfile.js', 'src/**/*.js', 'test/**/*.js']
# options:
# # options here to override JSHint defaults
# globals:
# jQuery: true
# console: true
# module: true
# document: true
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-stylus'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-nodemon'
grunt.loadNpmTasks 'grunt-exec'
grunt.loadNpmTasks 'grunt-concurrent'
grunt.loadNpmTasks 'grunt-karma'
# grunt.loadNpmTasks 'grunt-contrib-uglify'
# grunt.loadNpmTasks 'grunt-contrib-jshint'
# grunt.loadNpmTasks 'grunt-contrib-qunit'
# grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.registerTask 'default', ['coffee', 'stylus', 'exec:notify', 'concurrent:server_watch']
grunt.registerTask 'test', ['coffee', 'stylus', 'concurrent:test_server']