-
Notifications
You must be signed in to change notification settings - Fork 28
/
Gruntfile.js
102 lines (98 loc) · 2.47 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
css: {
src: [
'stylesheets/bootstrap.min.css',
'stylesheets/bootstrap-theme.min.css',
'stylesheets/font-awesome.css',
'stylesheets/google-fonts.css',
'stylesheets/main.css'
],
dest: 'dist/all.css'
},
js: {
src: [
'javascripts/jquery.min.js',
'javascripts/underscore.js',
'javascripts/backbone.js',
'javascripts/bootstrap.min.js',
'javascripts/jquery.easing.min.js',
'javascripts/jquery.jtruncate.js',
'javascripts/jquery.unveil.js',
'javascripts/jquery.appear.js',
'javascripts/jquery-ui-effects-only.js',
'javascripts/numeral.js',
'javascripts/main.js',
'javascripts/equity.js'
],
dest: 'dist/all.js'
}
},
cssmin: {
target: {
files: {'dist/all.min.css': ['dist/all.css']}
}
},
uglify: {
build: {
files: {
'dist/all.min.js': ['dist/all.js']
}
}
},
shell: {
jekyllBuild : {
command : 'bundle exec jekyll build --incremental'
},
jekyllServe : {
command : 'bundle exec jekyll serve --incremental --host 0.0.0.0'
}
},
connect: {
server: {
options: {
base: '_site/',
port: 4000
}
}
},
watch: {
js: {
files: ['javascripts/*.js'],
tasks: ['concat', 'uglify', 'shell:jekyllBuild']
},
css: {
files: ['stylesheets/*.css'],
tasks: ['concat', 'cssmin', 'shell:jekyllBuild']
},
jekyll: {
files: [
'*.html',
'resources/*.html',
'resources/**/*.html',
'_data/**/*.yml',
'_includes/*.html',
'_layouts/*.html',
'_config.yml',
'mobile/index.html',
'images/**/*.*'
],
tasks: ['shell:jekyllBuild']
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('serve', [
'shell:jekyllBuild',
'connect:server',
'watch'
]);
grunt.registerTask('default', ['serve']);
};