File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ docsify serve <path> [--open false] [--port 3000]
89
89
- Default: ` 3000 `
90
90
- Description: Choose a listen port, defaults to ` 3000 ` .
91
91
92
- ### ` gen ` command
92
+ ### ` generate ` command
93
93
94
94
Docsify's generators.
95
95
Original file line number Diff line number Diff line change @@ -17,16 +17,16 @@ module.exports = function (path = '', sidebar) {
17
17
18
18
if ( ! exists ( sidebarPath ) ) {
19
19
genSidebar ( cwdPath , sidebarPath )
20
- console . log ( chalk . green ( `Generate sidebar file '${ sidebar } ' success .` ) )
20
+ console . log ( chalk . green ( `Successfully generated the sidebar file '${ sidebar } '.` ) )
21
21
return true
22
22
}
23
23
24
- console . log ( chalk . red ( `${ sidebarPath } ` ) + ' already exists.' )
24
+ console . error ( chalk . red ( `${ sidebarPath } ` ) + ' already exists.' )
25
25
return false
26
26
}
27
27
}
28
28
29
- console . log ( chalk . red ( `${ cwdPath } ` ) + ' directory does not exist.' )
29
+ console . error ( chalk . red ( `${ cwdPath } ` ) + ' directory does not exist.' )
30
30
}
31
31
32
32
function genSidebar ( cwdPath , sidebarPath ) {
@@ -61,7 +61,7 @@ function genSidebar(cwdPath, sidebarPath) {
61
61
} )
62
62
fs . writeFile ( sidebarPath , tree , 'utf8' , err => {
63
63
if ( err ) {
64
- console . log ( chalk . red ( `Generate sidebar file error, message : ${ err . message } ` ) )
64
+ console . error ( chalk . red ( `Couldn't generate the sidebar file, error : ${ err . message } ` ) )
65
65
}
66
66
} )
67
67
}
You can’t perform that action at this time.
0 commit comments