File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,12 @@ module.exports = function (grunt) {
4
4
grunt . loadNpmTasks ( 'grunt-gitbook' ) ;
5
5
grunt . loadNpmTasks ( 'grunt-gh-pages' ) ;
6
6
grunt . loadNpmTasks ( 'grunt-contrib-clean' ) ;
7
+ grunt . loadNpmTasks ( 'grunt-http-server' ) ;
7
8
8
9
grunt . initConfig ( {
9
10
'gitbook' : {
10
11
development : {
11
- dest : path . join ( __dirname , ".grunt/gitbook" ) ,
12
+ output : path . join ( __dirname , ".grunt/gitbook" ) ,
12
13
input : "./" ,
13
14
title : "Mac OS X Setup Guide" ,
14
15
description : "Guide to setting up developer environment on OS X" ,
@@ -23,9 +24,29 @@ module.exports = function (grunt) {
23
24
} ,
24
25
'clean' : {
25
26
files : '.grunt'
27
+ } ,
28
+ 'http-server' : {
29
+ 'dev' : {
30
+ // the server root directory
31
+ root : '.grunt/gitbook' ,
32
+
33
+ port : 4000 ,
34
+ host : "127.0.0.1" ,
35
+
36
+ showDir : true ,
37
+ autoIndex : true ,
38
+ defaultExt : "html" ,
39
+
40
+ //wait or not for the process to finish
41
+ runInBackground : false
42
+ }
26
43
}
27
44
} ) ;
28
45
46
+ grunt . registerTask ( 'test' , [
47
+ 'gitbook' ,
48
+ 'http-server'
49
+ ] ) ;
29
50
grunt . registerTask ( 'publish' , [
30
51
'gitbook' ,
31
52
'gh-pages' ,
Original file line number Diff line number Diff line change 23
23
"url" : " https://github.com/sb2nov/mac-setup/issues"
24
24
},
25
25
"homepage" : " http://sourabhbajaj/mac-setup" ,
26
+ "dependencies" : {},
26
27
"devDependencies" : {
27
- "grunt" : " ^ 0.4.4 " ,
28
+ "grunt" : " 0.4.1 " ,
28
29
"grunt-contrib-clean" : " ~0.5.0" ,
29
30
"grunt-gh-pages" : " 0.9.1" ,
30
- "grunt-gitbook" : " 0.1.1 "
31
+ "grunt-gitbook" : " 0.2.3 "
31
32
},
32
33
"peerDependencies" : {
33
- "grunt" : " ~ 0.4.1"
34
+ "grunt" : " 0.4.1"
34
35
}
35
36
}
You can’t perform that action at this time.
0 commit comments