-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
101 lines (90 loc) · 3.01 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
default: {
files: {
"dist/Default/styleguide.css": "src/Default/styleguide.less"
}
}
},
autoprefixer: {
default: {
src: "dist/**/*.css"
}
},
cssmin: {
default: {
files: [{
expand: true,
cwd: "dist",
src: ["**/*.css", "!*.min.css"],
dest: "dist",
ext: ".min.css"
}]
}
},
concat: {
options: {
banner: "/*! <%= pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today('yyyy-mm-dd') %> */\n"
},
default: {
src: [
"bower_components/jquery-ui/ui/jquery.ui.core.js",
"bower_components/jquery-ui/ui/jquery.ui.widget.js",
"bower_components/jquery.tocify.js/src/javascripts/jquery.tocify.js",
"src/Default/styleguide.js"
],
dest: "dist/Default/styleguide.js"
}
},
uglify: {
default: {
files: [{
expand: true,
cwd: "dist",
src: "**/*.js",
dest: "dist",
ext: ".min.js"
}]
}
},
styledown: {
default: {
files: {
"examples/Default/index.html": ["examples/Default/styleguide.md"]
},
options: {
title: "styledown-skins | Default",
css: "http://yui.yahooapis.com/pure/0.5.0/pure-min.css",
sg_css: "../../dist/Default/styleguide.min.css",
sg_js: [
"//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js",
"../../dist/Default/styleguide.min.js"
],
body:
"<div class=sg-menu>" +
"<div class=sg-title>Example Style Guide</div>" +
"<nav class=sg-toc></nav>" +
"</div>" +
"<div class=sg-content>" +
"<div sg-content></div>" +
"<div class=sg-copyright>© Example Copyright</div>" +
"</div>"
}
}
}
});
grunt.registerTask("default", [
"less",
"autoprefixer",
"cssmin",
"concat",
"uglify",
"styledown"
]);
// load all grunt tasks matching the `grunt-*` pattern.
// Eleminates need for individual grunt.loadNpmTasks() calls.
require("load-grunt-tasks")(grunt);
};