-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
50 lines (43 loc) · 1.18 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
/*
* Statik
* https://github.com/pesima/
*
* Copyright (c) 2013 PESIMA
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
assemble: {
// Task-level options
options: {
flatten: true,
data: 'src/**/*.{json,yml}',
assets: 'site/assets',
helpers: 'src/helpers/helper-*.js',
layoutdir: 'src/layouts',
partials: ['src/includes/**/*.hbs'],
},
site: {
// Target-level options
options: {layout: 'default.hbs'},
files: [
{ expand: true, cwd: 'src', src: ['*.hbs', '!index.hbs'], dest: 'site/' },
{ expand: true, cwd: 'src', src: ['index.hbs'], dest: './' }
]
}
},
// Before generating any new files,
// remove any previously-created files.
clean: {
all: ['site/**/*.{html,md}', 'index.html']
}
});
// Load npm plugins to provide necessary tasks.
grunt.loadNpmTasks('assemble');
grunt.loadNpmTasks('grunt-contrib-clean');
// Default task to be run.
grunt.registerTask('default', ['clean', 'assemble']);
};