-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
112 lines (106 loc) · 2.84 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
module.exports = (grunt) ->
grunt.initConfig
coffee:
dist:
expand: true
flatten: false
cwd: "src/js"
src: ["**/*.coffee"]
dest: 'build/js'
ext: ".js"
spec:
expand: true
flatten: false
cwd: 'spec/js'
src: ["**/*.coffee"]
dest: 'build/js'
ext: '.js'
haml:
dist:
expand: true
flatten: false
cwd: 'src'
src: ['**/*.haml']
dest: 'build'
ext: '.html'
spec:
expand: true
flatten: false
cwd: 'spec'
src: ['**/*.haml']
dest: 'build'
ext: '.html'
sass:
dist:
options:
style: 'expanded'
trace: true
files: [
expand: true
cwd: 'src/css'
src: ['**/*.scss']
dest: 'build/css'
ext: '.css'
]
copy:
dist:
files:
'build/css/bootstrap.min.css': 'src/css/bootstrap.min.css'
'build/css/animate.css': 'src/css/animate.css'
'build/images/favicon.ico': 'src/images/favicon.ico'
'build/images/opsman-logo.png': 'src/images/opsman-logo.png'
spec:
files:
'build/js/lib/jasmine-jquery.js': 'node_modules/jasmine-jquery/lib/jasmine-jquery.js'
jasmine:
spec:
src: ['build/js/**/main.js']
options:
specs: 'build/js/**/*-spec.js'
vendor: [
'build/js/lib/knockout-latest.js'
'build/js/lib/jquery.min.js'
'build/js/lib/jasmine-jquery.js'
'https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.js'
]
concurrent:
dist:
['watch']
watch:
coffee:
files: ["src/js/**/*.coffee"]
tasks: ["compile:coffee:dist"]
haml:
files: ["src/**/*.haml"]
tasks: ["compile:haml:dist"]
scss:
files: ['src/css/*']
tasks: ['compile:scss']
spec_coffee:
files: ["spec/js/**/*.coffee"]
tasks: ["compile:coffee:spec"]
spec_haml:
files: ['spec/**/*.haml']
tasks: ["compile:haml:spec"]
connect:
server:
options:
port: 8000
base: 'build'
'gh-pages':
options:
base: 'build'
add: true
src: ['**']
#Load Tasks
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-haml2html'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.loadNpmTasks 'grunt-contrib-jasmine'
grunt.loadNpmTasks 'grunt-concurrent'
grunt.loadNpmTasks 'grunt-contrib-sass'
grunt.loadNpmTasks 'grunt-gh-pages'
grunt.registerTask 'compile', ['coffee', 'haml', 'copy', 'sass']
grunt.registerTask 'server', ['compile', 'connect:server', 'watch', 'concurrent:dist']