3
3
* directory. It is only for use in local development, and sets the --baseurl
4
4
* option to override the production-only baseurl in _config.yml.
5
5
*/
6
+ /* eslint-disable no-console */
6
7
'use strict' ;
7
8
8
9
const path = require ( 'path' ) ;
@@ -13,24 +14,24 @@ const argv = require( 'minimist' )( process.argv.slice( 2 ) );
13
14
const docsDir = path . resolve ( __dirname , '../documentation' ) ;
14
15
15
16
if ( argv . install || argv . i ) {
16
- // Install the ruby bundle needed to run jekyll
17
- const server = spawn ( 'bundle' , [ 'install' ] , {
18
- cwd : docsDir ,
19
- stdio : 'inherit'
20
- } ) ;
17
+ // Install the ruby bundle needed to run jekyll
18
+ const server = spawn ( 'bundle' , [ 'install' ] , {
19
+ cwd : docsDir ,
20
+ stdio : 'inherit' ,
21
+ } ) ;
21
22
22
- server . on ( 'error' , err => console . error ( err ) ) ;
23
+ server . on ( 'error' , err => console . error ( err ) ) ;
23
24
} else {
24
- // Start the server in local dev mode
25
- const bundleOptions = [ 'exec' , 'jekyll' , 'serve' , '--baseurl' , '' ] ;
26
- if ( argv . host ) {
27
- bundleOptions . push ( '--host' , argv . host ) ;
28
- }
25
+ // Start the server in local dev mode
26
+ const bundleOptions = [ 'exec' , 'jekyll' , 'serve' , '--baseurl' , '' ] ;
27
+ if ( argv . host ) {
28
+ bundleOptions . push ( '--host' , argv . host ) ;
29
+ }
29
30
30
- const server = spawn ( 'bundle' , bundleOptions , {
31
- cwd : docsDir ,
32
- stdio : 'inherit'
33
- } ) ;
31
+ const server = spawn ( 'bundle' , bundleOptions , {
32
+ cwd : docsDir ,
33
+ stdio : 'inherit' ,
34
+ } ) ;
34
35
35
- server . on ( 'error' , err => console . error ( err ) ) ;
36
+ server . on ( 'error' , err => console . error ( err ) ) ;
36
37
}
0 commit comments