-
Notifications
You must be signed in to change notification settings - Fork 4
/
Gruntfile.js
67 lines (57 loc) · 1.45 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
/*
* Assemble Example: Grid
* http://github.com/assemble/assemble
*
* Copyright (c) 2013 Assemble
* MIT License
*/
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
config: grunt.file.readJSON('src/config.json'),
// Build static files from templates and data.
assemble: {
options: {
helpers: '<%= config.helpers %>',
assets: 'docs/assets'
},
pages: {
options: {
layout : 'src/templates/layouts/default.hbs',
partials: 'src/templates/partials/**/*.hbs',
data : ['src/data/cheatsheet.json', 'src/config.json']
},
files: {
'docs' : [ 'src/templates/pages/cheatsheet.hbs' ]
}
}
},
less: {
compile: {
options: {
paths: [ 'src/styles', 'src/styles/bootstrap']
},
files: {
'docs/assets/css/cheatsheet.css': ['src/styles/cheatsheet.less'],
'docs/assets/js/prettify/prettify.css': ['src/styles/components/prettify.less']
}
}
},
watch: {
src: {
files: [ 'src/**/*.*' ],
tasks: [ 'assemble', 'less' ]
}
}
});
// Load npm plugins to provide necessary tasks.
grunt.loadNpmTasks('assemble');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task to be run.
grunt.registerTask('default', [
'assemble',
'less'
]);
};