-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
64 lines (57 loc) · 1.28 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
"use strict";
module.exports = function (grunt) {
// -----------------------------------
// Plugins
// -----------------------------------
grunt.loadNpmTasks("grunt-ect");
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-watch");
// -----------------------------------
// Options
// -----------------------------------
grunt.config.init({
dir: {
src: "src",
dest: "public_html"
},
less: {
style: {
options: {
cleancss: true
},
src: "<%= dir.src %>/less/main.less",
dest: "<%= dir.dest %>/css/main.css"
},
},
ect: {
options: {
root: "<%= dir.src %>/ect"
},
index: {
src: "index.ect",
dest: "<%= dir.dest %>/index.html",
variables: {
id: "top",
title: "Document Title",
links: [
"http://example1.example", "http://example2.example", "http://example3.example"
]
}
}
},
watch: {
less: {
files: ["<%= dir.src %>/less/*.less"],
tasks: ["less"]
},
watch: {
files: ["<%= dir.src %>/ect/*.ect"],
tasks: ["ect"]
}
}
});
// -----------------------------------
// Tasks
// -----------------------------------
grunt.registerTask("default", ["less", "ect", "watch"]);
};