Skip to content

Commit 66ea7ec

Browse files
committed
Add gruntfile for building using GitBook
1 parent 7024b98 commit 66ea7ec

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@
2323

2424
# SDK binaries
2525
/src/sdk/bootdisk/bin/hello
26-
/src/sdk/c.img
26+
/src/sdk/c.img
27+
28+
node_modules
29+
.grunt

Gruntfile.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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: "How to Make a Computer Operating System in C++",
14+
github: "SamyPesse/How-to-Make-a-Computer-Operating-System"
15+
}
16+
},
17+
'gh-pages': {
18+
options: {
19+
base: '.grunt/gitbook'
20+
},
21+
src: ['**']
22+
},
23+
'clean': {
24+
files: '.grunt'
25+
}
26+
});
27+
28+
grunt.registerTask('publish', [
29+
'gitbook',
30+
'gh-pages',
31+
'clean'
32+
]);
33+
grunt.registerTask('default', 'gitbook');
34+
};

package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "how-to-make-an-operating-system",
3+
"version": "0.0.1",
4+
"description": "",
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/SamyPesse/How-to-Make-a-Computer-Operating-System.git"
8+
},
9+
"author": "Samy Pesse <[email protected]>",
10+
"license": "Apache 2",
11+
"dependencies": {},
12+
"devDependencies": {
13+
"grunt": "~0.4.1",
14+
"grunt-gitbook": "git+https://github.com/GitbookIO/grunt-gitbook.git",
15+
"grunt-gh-pages": "0.9.1",
16+
"grunt-contrib-clean": "~0.5.0"
17+
},
18+
"peerDependencies": {
19+
"grunt": "~0.4.1"
20+
}
21+
}

0 commit comments

Comments
 (0)