GeezerVison is showing github.com — Add gruntfile for building and publishing · DoranBlade/javascript@597ffbe
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -/_book/ | | 1 | +node_modules | | 2 | +.grunt |
Collapse file Copy file name to clipboard +35Lines changed: 35 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +var path = require("path"); | | 2 | + | | 3 | +module.exports = function (grunt) { | | 4 | + grunt.loadNpmTasks('grunt-gitbook'); | | 5 | + grunt.loadNpmTasks('grunt-gh-pages'); | | 6 | + grunt.loadNpmTasks('grunt-contrib-clean'); | | 7 | + | | 8 | + grunt.initConfig({ | | 9 | + 'gitbook': { | | 10 | + development: { | | 11 | + dest: path.join(__dirname, ".grunt/gitbook"), | | 12 | + input: "./", | | 13 | + title: "Learn Javascript", | | 14 | + description: "Interactive online course for learning Javascript.", | | 15 | + github: "GitbookIO/javascript" | | 16 | + } | | 17 | + }, | | 18 | + 'gh-pages': { | | 19 | + options: { | | 20 | + base: '.grunt/gitbook' | | 21 | + }, | | 22 | + src: ['**'] | | 23 | + }, | | 24 | + 'clean': { | | 25 | + files: '.grunt' | | 26 | + } | | 27 | + }); | | 28 | + | | 29 | + grunt.registerTask('publish', [ | | 30 | + 'gitbook', | | 31 | + 'gh-pages', | | 32 | + 'clean' | | 33 | + ]); | | 34 | + grunt.registerTask('default', 'gitbook'); | | 35 | +}; |
Collapse file Copy file name to clipboard +21Lines changed: 21 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +{ | | 2 | + "name": "Javascript", | | 3 | + "version": "0.0.1", | | 4 | + "description": "", | | 5 | + "repository": { | | 6 | + "type": "git", | | 7 | + "url": "https://github.com/GitbookIO/javascript.git" | | 8 | + }, | | 9 | + | | 10 | + "license": "Apache 2", | | 11 | + "dependencies": {}, | | 12 | + "devDependencies": { | | 13 | + "grunt": "~0.4.1", | | 14 | + "grunt-gitbook": "0.0.2", | | 15 | + "grunt-gh-pages": "0.9.1", | | 16 | + "grunt-contrib-clean": "~0.5.0" | | 17 | + }, | | 18 | + "peerDependencies": { | | 19 | + "grunt": "~0.4.1" | | 20 | + } | | 21 | +} |
|