@@ -17,10 +17,8 @@ const {
1717 copyDirSync,
1818 copyDirToSync,
1919 render,
20- // getGhPagesBaseUrl,
2120 validateDefinitionFileName,
2221 readYaml
23- // getCurrentGitHubRepo
2422} = require ( './lib/utils' ) ;
2523
2624const { installDeps } = require ( './lib/install-deps' ) ;
@@ -68,48 +66,15 @@ async function ask(openapiRoot, docsRoot) {
6866 validate : i => ( i . length > 0 ? true : `API Name can't be empty` )
6967 } ) ;
7068
71- // const { splitSpec } = await prompt({
72- // type: 'confirm',
73- // name: 'splitSpec',
74- // message: `Split spec into separate files: paths/*, definitions/* ${chalk.yellow(
75- // '[Experimental]'
76- // )}?`,
77- // default: true
78- // });
79-
8069 const { codeSamples } = await prompt ( {
8170 type : 'confirm' ,
8271 name : 'codeSamples' ,
8372 message : `Prepare manual code samples folder?` ,
8473 default : true
8574 } ) ;
8675
87- // const { swaggerUI } = await prompt({
88- // type: 'confirm',
89- // name: 'swaggerUI',
90- // message: `Install SwaggerUI?`,
91- // default: false
92- // });
93-
94- // const { travis } = await prompt({
95- // type: 'confirm',
96- // name: 'travis',
97- // message: `Set up Travis CI?`,
98- // default: true
99- // });
10076
10177 let repo ;
102- // if (travis) {
103- // repo = (await prompt({
104- // type: 'input',
105- // name: 'repo',
106- // message: `Specify name of GitHub repo in format ${chalk.blue('User/Repo')}:`,
107- // default: getCurrentGitHubRepo,
108- // validate: function(input) {
109- // return input.indexOf('/') > 0 ? true : 'Repo Name must contain "/"';
110- // }
111- // })).repo;
112- // }
11378
11479 const { proceed } = await prompt ( {
11580 type : 'confirm' ,
@@ -127,10 +92,7 @@ async function ask(openapiRoot, docsRoot) {
12792 return {
12893 definitionFileName,
12994 apiTitle,
130- // splitSpec,
13195 codeSamples,
132- // swaggerUI,
133- // travis,
13496 repo,
13597 proceed
13698 } ;
@@ -205,7 +167,6 @@ Choose another directory or remove contents.
205167 const data = {
206168 ...opts ,
207169 packageName : slugify ( opts . apiTitle ) . toLowerCase ( )
208- // ghPagesBaseUrl: opts.repo ? getGhPagesBaseUrl(opts.repo) : undefined
209170 } ;
210171
211172 let { definitionFileName } = opts ;
@@ -230,10 +191,6 @@ Choose another directory or remove contents.
230191 copyDirSync ( 'openapi/code_samples' , openapiRoot ) ;
231192 }
232193
233- // if (opts.travis) {
234- // await copy('.travis.yml');
235- // }
236-
237194 copyDirToSync ( 'docs' , docsRoot ) ;
238195
239196 splitDefinition ( readYaml ( definitionFileName ) , openapiRoot ) ;
0 commit comments