@@ -33,8 +33,8 @@ const pkg = require('../package.json');
3333
3434const versions = {
3535 'kit' : {
36- version : '1.4.1 ' ,
37- date : '2017-05-30 ' ,
36+ version : '1.5.0 ' ,
37+ date : '2017-06-01 ' ,
3838 } ,
3939 'kit.ts' : {
4040 version : '1.1.2' ,
@@ -243,21 +243,27 @@ const args = yargs
243243 name : `Typescript - v${ versions [ 'kit.ts' ] . version } (${ versions [ 'kit.ts' ] . date } )` ,
244244 value : 'kit.ts' ,
245245 } ,
246- ]
246+ ] ,
247+ when ( ) {
248+ return ! ( args . js || args . ts ) ;
249+ } ,
247250 }
248251 ] ;
249252
250253 // Once questions have been answered, we'll have an `answers` object
251254 // containing the responses
252255 inquirer . prompt ( questions ) . then ( answers => {
253-
254256 // Inject answers to our `args`, so that we've got a complete set
255257 // of options to use
256258 Object . assign ( args , answers ) ;
257259
258260 // Modify path to be absolute
259261 args . path = path . resolve ( process . cwd ( ) , args . path ) ;
260262
263+ // Modify repo based on kit flavour
264+ if ( args . js ) args . repo = 'kit' ;
265+ else if ( args . ts ) args . repo = 'kit.ts' ;
266+
261267 // Create a tmp file stream to save the file locally
262268 const file = temp . createWriteStream ( ) ;
263269
@@ -397,22 +403,31 @@ const args = yargs
397403 console . log ( pkg . version ) ;
398404 } ,
399405 } )
400- . option ( 'name' , {
401- alias : 'n' ,
402- describe : 'New project name' ,
403- } )
404- . option ( 'desc' , {
405- alias : 'd' ,
406- describe : 'Project description' ,
407- } )
408- . option ( 'path' , {
409- alias : 'p' ,
410- describe : 'Path to install the starter kit' ,
411- } )
412- . option ( 'license' , {
413- alias : 'l' ,
414- describe : 'License for pkg.json' ,
406+ . options ( {
407+ name : {
408+ alias : 'n' ,
409+ describe : 'New project name' ,
410+ } ,
411+ desc : {
412+ alias : 'd' ,
413+ describe : 'Project description' ,
414+ } ,
415+ path : {
416+ alias : 'p' ,
417+ describe : 'Path to install the starter kit' ,
418+ } ,
419+ license : {
420+ alias : 'l' ,
421+ describe : 'License for pkg.json' ,
422+ } ,
423+ js : {
424+ describe : 'Install Javascript (ES6) version' ,
425+ } ,
426+ ts : {
427+ describe : 'Install Typescript version' ,
428+ }
415429 } )
430+ . boolean ( [ 'js' , 'ts' ] )
416431 . help ( )
417432 . argv ;
418433
0 commit comments