generator-gitbook-base
Version:
36 lines (32 loc) • 893 B
JavaScript
var path = require("path");
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-gitbook');
grunt.loadNpmTasks('grunt-gh-pages');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.initConfig({
'gitbook': {
development: {
output: path.join(__dirname, ".grunt/gitbook"),
input: "./",
title: "<%= _.slugify(title) %>",
description: "<%= _.slugify(desc) %>",
github: "<%= _.slugify(github_url) %>"
}
},
'gh-pages': {
options: {
base: '.grunt/gitbook'
},
src: ['**']
},
'clean': {
files: '.grunt'
}
});
grunt.registerTask('publish', [
'gitbook',
'gh-pages',
'clean'
]);
grunt.registerTask('default', 'gitbook');
};