forked from prateekbh/veronica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
89 lines (78 loc) · 2.32 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
/* =====================================
Grunt Scripts
=======================================*/
var compiledFile = "./veronica.js";
var compiledFileWithCompiler = "./veronica+compiler.js";
var compiledMinFile = "./veronica.min.js";
var compiledMinFile = "./veronica.min.js";
var jsFiles = [
"./node_modules/riot/riot.js",
"./wrap/prefix.js",
"./lib/capabilities.js",
"./lib/sizzle.js",
"./lib/dispatcher.js",
"./lib/promises.js",
"./lib/ajax.js",
"./lib/storage.js",
"./lib/extend.js",
"./lib/router.js",
"./flux-classes/actions.js",
"./flux-classes/stores.js",
"./lib/init.js",
"./wrap/suffix.js"
];
var jsFilesWithCompiler = [
"./node_modules/riot/riot+compiler.js",
"./wrap/prefix.js",
"./lib/capabilities.js",
"./lib/sizzle.js",
"./lib/dispatcher.js",
"./lib/promises.js",
"./lib/ajax.js",
"./lib/storage.js",
"./lib/extend.js",
"./lib/router.js",
"./flux-classes/actions.js",
"./flux-classes/stores.js",
"./lib/init.js",
"./wrap/suffix.js"
];
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
clean: {
pre_build: [compiledFile, compiledMinFile]
},
concat: {
concat_js_wo_compiler: {
src: jsFiles,
dest: compiledFile,
},
concat_js_with_compiler: {
src: jsFilesWithCompiler,
dest: compiledFileWithCompiler,
}
},
uglify: {
veronica: {
files: {
'veronica.min.js': ['veronica.js']
}
},
veronica_compiler: {
files: {
'veronica+compiler.min.js': ['veronica+compiler.js']
}
}
}
});
// Load the plugin that provides the "clean" task.
grunt.loadNpmTasks('grunt-contrib-clean');
// Load the plugin that provides the "concat" task.
grunt.loadNpmTasks("grunt-contrib-concat");
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
//Task for building the static contents of the application
grunt.registerTask("default", ["clean:pre_build", "concat","uglify"]);
};