This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
grunt.js
49 lines (39 loc) · 1.56 KB
/
grunt.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
// This is the main application configuration file. It is a Grunt
// configuration file, which you can learn more about here:
// https://github.com/cowboy/grunt/blob/master/docs/configuring.md
//
module.exports = function(grunt) {
grunt.initConfig({
// The clean task ensures all files are removed from the dist/ directory so
// that no files linger from previous builds.
clean: ["style.css"],
// This task uses the MinCSS Node.js project to take all your CSS files in
// order and concatenate them into a single CSS file named index.css. It
// also minifies all the CSS as well. This is named index.css, because we
// only want to load one stylesheet in index.html.
mincss: {
"style.css": [
"style.css"
]
},
less: {
main: {
files: {
'style.css' : 'less/_all.less'
}
}
}
});
// The default task will remove all contents inside the dist/ folder, lint
// all your code, precompile all the underscore templates into
// dist/debug/templates.js, compile all the application code into
// dist/debug/require.js, and then concatenate the require/define shim
// almond.js and dist/debug/templates.js into the require.js file.
grunt.registerTask("default", "clean less");
// The debug task is simply an alias to default to remain consistent with
// debug/release.
grunt.registerTask("debug", "default");
// The release task will run the debug tasks and then minify the
// dist/debug/require.js file and CSS files.
grunt.registerTask("release", "default mincss");
};