-
Notifications
You must be signed in to change notification settings - Fork 12
/
Gruntfile.js
108 lines (104 loc) · 2.19 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
107
108
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
server: {
options: {
base: '_site/',
port: 9000,
open: true,
hostname: 'localhost'
}
}
},
shell: {
prod: {
command: "jekyll build --config '_config-prod.yml'",
options: {
async: false
}
},
dev: {
command: 'jekyll build',
options: {
async: false
}
}
},
watch: {
css: {
files: ['_sass/**/*.scss'],
tasks: ['compass','shell:dev'],
},
html: {
files: ['**/*.html', '!_site/**/*.html'],
tasks: ['shell:dev']
}
},
compass: {
dist: {
options: {
config: 'config.rb'
}
}
},
copy: {
main: {
src: 'lib/js/vendor/modernizr-2.6.2.min.js',
dest: 'js/vendor/modernizr-2.6.2.min.js',
},
},
concat: {
index: {
src: [
'lib/js/vendor/jquery-1.11.1.min.js',
'lib/js/vendor/underscore-min.js',
'lib/js/vendor/backbone-min.js',
'lib/js/vendor/jquery.mousewheel.js',
'lib/js/vendor/jquery.jscrollpane.js',
'lib/js/vendor/waypoints.min.js',
'lib/js/app.js',
'lib/js/ui/navbar.js'
],
dest: 'js/docs.js',
}
},
uglify: {
dist: {
files: {
'js/docs.min.js': ['js/docs.js'],
'js/index.min.js': ['lib/js/index.js'],
'js/editor.min.js': ['lib/js/editor.js'],
'js/tutorials.min.js': ['lib/js/tutorials.js']
}
}
},
cssmin: {
combine: {
files: {
'css/docs.min.css': [
'lib/css/vendor/jquery.jscrollpane.css',
'lib/css/vendor/syntax.css',
'lib/css/docs.css'
]
}
}
}
});
grunt.registerTask('build', [
'copy',
'concat',
'uglify',
'compass',
'cssmin',
'shell:prod',
]);
grunt.registerTask('default', [
// 'test',
'compass',
'shell:dev',
'connect',
'watch'
]);
};