-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
106 lines (101 loc) · 2.24 KB
/
Gruntfile.js
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
'use strict';
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
clean: ['dist/*'],
compass: {
clean: {
options: {
clean: true
}
},
dist: {
options: {
cssDir: 'dist/stylesheets',
outputStyle: 'compressed',
sassDir: 'app/sass'
}
},
dev: {
options: {
cssDir: 'dist/stylesheets',
outputStyle: 'expanded',
sassDir: 'app/sass'
}
}
},
connect: {
options: {
hostname: 'localhost',
open: false
},
dist: {
options: {
base: 'dist',
port: 9000,
livereload: false
}
}
},
copy: {
dist: {
files: [
{
cwd: 'app',
dest: 'dist',
expand: true,
src: ['{,*/}*.html']
},
{
cwd: 'app/bower_components/jquery/dist',
dest: 'dist/javascripts/vendor',
expand: true,
src: ['jquery.min.js', 'jquery.min.map']
},
{
cwd: 'app/bower_components/handlebars',
dest: 'dist/javascripts/vendor',
expand: true,
src: ['handlebars.min.js']
},
{
cwd: 'app/javascripts',
dest: 'dist/javascripts',
expand: true,
src: ['main.js']
}
]
}
},
'gh-pages': {
options: {
base: 'dist'
},
src: '**/*'
},
watch: {
compass: {
files: ['app/sass/{,*/}*.{scss,sass}'],
tasks: ['compass:dev'],
options: {
spawn: false,
livereload: false
}
},
copy: {
files: ['app/{,*/}*.html', 'app/javascripts/{,*/}*.js'],
tasks: ['copy:dist'],
options: {
spawn: false,
livereload: false
}
},
gruntfile: {
files: ['Gruntfile.js']
}
}
});
grunt.registerTask('serve', ['compass:dev', 'copy:dist', 'connect', 'watch']);
grunt.registerTask('build', ['clean', 'compass:clean', 'compass:dist', 'copy:dist']);
grunt.registerTask('deploy', ['build', 'gh-pages']);
};