forked from franciscop/picnic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
80 lines (73 loc) · 1.71 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
var fs = require("fs");
module.exports = function(grunt) {
grunt.initConfig({
jade: {
compile: {
files: [
{
cwd: "web",
src: "**/*.html.jade",
dest: ".",
expand: true,
ext: ".html"
}
]
}
},
concat: {
options: { separator: "\n\n" },
basic_and_extras: {
files: {
"temp/test.html": ["src/test.html", "src/plugins/**/test.html"],
"temp/readme.md": ["src/readme.md", "src/plugins/**/readme.md"]
}
}
},
copy: {
main: {
files: [
{ src: "picnic.min.css", dest: "releases/picnic.min.css" },
{ src: "picnic.min.css", dest: "releases/plugins.min.css" }
]
}
},
usebanner: {
taskName: {
options: {
position: "top",
banner:
"/* Picnic CSS v" +
grunt.file.readJSON("package.json").version +
" http://picnicss.com/ */",
linebreak: true
},
files: { src: "picnic.min.css" }
}
},
watch: {
scripts: {
files: ["package.js", "Gruntfile.js", "src/**/*.*", "web/**/*.*"],
tasks: ["default"],
options: { spawn: false }
}
},
bytesize: {
all: {
src: ["picnic.min.css"]
}
}
});
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-banner");
grunt.loadNpmTasks("grunt-contrib-copy");
grunt.loadNpmTasks("grunt-contrib-jade");
grunt.loadNpmTasks("grunt-bytesize");
grunt.registerTask("default", [
"concat",
"usebanner",
"copy",
"jade",
"bytesize"
]);
};