-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
51 lines (43 loc) · 1.22 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
/*
* example-assemble-anchors
* https://github.com/assemble/example-assemble-anchors
* Copyright (c) 2013
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
var pretty = require('pretty');
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
vendor: grunt.file.readJSON('.bowerrc').directory,
site: grunt.file.readYAML('_config.yml'),
// Build HTML from templates and data
assemble: {
options: {
flatten: true,
site: '<%= site %>',
assets: '_gh_pages/assets',
partials: ['templates/includes/*.hbs'],
layouts: 'templates/layouts',
postprocess: pretty
},
example: {
options: {
plugins: ['assemble-contrib-anchors'],
},
files: {'_gh_pages/': ['templates/*.hbs']}
}
},
// Before generating any new files,
// remove any previously-created files.
clean: {
example: ['_gh_pages/*.html']
}
});
// Load npm plugins to provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('assemble');
// Default tasks to be run.
grunt.registerTask('default', ['clean', 'assemble']);
};