@@ -38,7 +38,7 @@ async function ask() {
3838 type : "input" ,
3939 name : "specFileName" ,
4040 message :
41- "Please specify the path to the OpenAPI/Swagger spec (local file):" ,
41+ "Please specify the path to the OpenAPI spec (local file):" ,
4242 validate ( fileName ) {
4343 return validateSpecFileName ( fileName ) ;
4444 }
@@ -115,8 +115,13 @@ async function ask() {
115115}
116116
117117function printSuccess ( opts , root ) {
118+ let travisNote = '' ;
119+ if ( opts . travis ) {
120+ travisNote = `We generated ${ chalk . blue ( '.travis' ) } for you. Follow steps from ${ chalk . blue ( 'README.md' ) } to finish Travis CI setup`
121+ }
122+
118123 console . log ( `${ chalk . green ( "Success!" ) } Created ${ chalk . green (
119- path . dirname ( root )
124+ path . basename ( root )
120125 ) } at ${ chalk . blue ( root ) }
121126Inside that directory, you can run several commands:
122127
@@ -131,15 +136,13 @@ Inside that directory, you can run several commands:
131136 ${ chalk . blue ( `npm test` ) }
132137 Validates the spec.
133138
134- ${ opts . travis &&
135- ` ${ chalk . blue ( `npm run deploy` ) }
136- Deploys the spec to GitHub Pages. You don't need to run it manually if you have Travis CI configured.
137- ` }
139+ ${ chalk . blue ( `npm run gh-pages` ) }
140+ Deploys docs to GitHub Pages. You don't need to run it manually if you have Travis CI configured.
138141
139142We suggest that you begin by typing:
140143
141- ${ chalk . blue ( "cd" ) } ${ path . dirname ( root ) }
142- ${ chalk . blue ( "npm start" ) } ` ) ;
144+ ${ chalk . blue ( "cd" ) } ${ path . basename ( root ) }
145+ ${ chalk . blue ( "npm start" ) } ` + ( travisNote ? '\n\n' + travisNote : '' ) ) ;
143146}
144147
145148async function run ( ) {
@@ -176,7 +179,7 @@ Choose another directory or remove contents.
176179
177180 const data = {
178181 ...opts ,
179- packageName : slugify ( opts . apiTitle ) ,
182+ packageName : slugify ( opts . apiTitle ) . toLowerCase ( ) ,
180183 ghPagesBaseUrl : opts . repo ? getGhPagesBaseUrl ( opts . repo ) : undefined
181184 } ;
182185
@@ -211,13 +214,13 @@ Choose another directory or remove contents.
211214
212215 copyDirSync ( "web" ) ;
213216
214- swaggerRepo . syncWithSwagger ( fs . readFileSync ( specFileName ) . toString ( ) ) ;
217+ swaggerRepo . syncWithSpec ( fs . readFileSync ( specFileName ) . toString ( ) ) ;
215218
216219 fs . writeFileSync ( REDOCLY_RC , yaml . safeDump ( opts , { skipInvalid : true } ) ) ;
217220
218221 console . log ( "Installing packages. This might take a couple of minutes.\n" ) ;
219222
220- await installDeps ( opts ) ;
223+ await installDeps ( '@^2.0.0-rc.2' ) ;
221224 console . log ( ) ;
222225
223226 try {
0 commit comments