-
Notifications
You must be signed in to change notification settings - Fork 96
/
Gruntfile.coffee
58 lines (48 loc) · 1.43 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
watch:
coffee:
files: ['src/**/*.coffee']
tasks: ['coffee']
stylus:
files: ['src/views/stylesheets/app.styl']
tasks: ['stylus:compile']
spec:
files: ['src/**/*.coffee','!src/views/**/*.coffee']
tasks: ['spec:default']
coffee:
server:
expand: true
flatten: false
cwd: 'src/'
src: ['**/*.coffee','!views/**/*']
dest: 'dist/'
ext: '.js'
ui:
files:
'dist/public/concrete.js': ['src/views/js/concrete.coffee']
stylus:
compile:
files:
'dist/public/stylesheets/app.css': ['src/views/stylesheets/app.styl']
copy:
statics:
files: [
expand: true
flatten: false
cwd: 'statics/'
src: ['**/*']
dest: 'dist/public/'
]
views:
files:
'dist/views/index.coffee': ['src/views/index.coffee']
'dist/views/jobPartial.coffee': ['src/views/jobPartial.coffee']
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-stylus'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-jasmine-bundle'
grunt.registerTask 'default', ['spec:default', 'build', 'watch']
grunt.registerTask 'build', ['coffee', 'stylus', 'copy']