forked from moment/momentjs.com
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
100 lines (96 loc) · 2.04 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
module.exports = function(grunt) {
grunt.initConfig({
concat: {
core_home: {
src: 'source/js/core-home.js',
dest: 'static/js/core-home.js'
},
core_test: {
src: [
'source/js/test-start.js',
'libs/nodeunit/nodeunit.js',
'libs/moment/test/moment/*.js',
'libs/moment/test/lang/*.js',
'source/js/test.js',
'source/js/test-end.js'
],
dest: 'static/js/core-test.js'
},
timezone_home: {
src: 'source/js/timezone-home.js',
dest: 'static/js/timezone-home.js'
},
timezone_data: {
src: 'source/js/timezone-data.js',
dest: 'static/js/timezone-data.js'
},
timezone_test: {
src: [
'source/js/test-start.js',
'libs/nodeunit/nodeunit.js',
'libs/moment-timezone/tests/**/*.js',
'source/js/test.js',
'source/js/test-end.js'
],
dest: 'static/js/timezone-test.js'
},
global: {
src: [
'libs/moment/moment.js',
'libs/moment/min/langs.js',
'libs/moment-timezone/moment-timezone.js',
'source/js/timezone-data-start.js',
'libs/moment-timezone/moment-timezone.json',
'source/js/timezone-data-end.js'
],
dest: 'static/js/global.js'
}
},
uglify: {
global: {
src: 'static/js/global.js',
dest: 'static/js/global.min.js'
}
},
compass: {
prod: {
options: {
sassDir: 'source/css',
cssDir: 'static/css'
}
}
},
watch: {
css: {
files: [
'source/css/*',
'source/css/**/*'
],
tasks: 'compass'
},
js: {
files: [
'source/**/*.js',
'libs/**/*.js'
],
tasks: ['concat', 'uglify']
},
html: {
files: [
"source/**/*.md",
"source/**/*.html",
"source/**/*.json"
],
tasks: ["html"]
}
}
});
grunt.registerTask("default", ["html", "concat", "uglify", "compass"]);
// plugin tasks
grunt.loadNpmTasks("grunt-contrib-compass");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-watch");
// tasks
grunt.loadTasks("source/tasks");
};