@@ -52,6 +52,7 @@ if (currentNodeVersion.split('.')[0] < 4) {
52
52
process . exit ( 1 ) ;
53
53
}
54
54
55
+ var commander = require ( 'commander' ) ;
55
56
var fs = require ( 'fs-extra' ) ;
56
57
var path = require ( 'path' ) ;
57
58
var execSync = require ( 'child_process' ) . execSync ;
@@ -60,7 +61,7 @@ var semver = require('semver');
60
61
61
62
var projectName ;
62
63
63
- var program = require ( ' commander' )
64
+ var program = commander
64
65
. version ( require ( './package.json' ) . version )
65
66
. arguments ( '<project-directory>' )
66
67
. usage ( chalk . green ( '<project-directory>' ) + ' [options]' )
@@ -69,7 +70,7 @@ var program = require('commander')
69
70
} )
70
71
. option ( '--verbose' , 'print additional logs' )
71
72
. option ( '--scripts-version <alternative-package>' , 'use a non-standard version of react-scripts' )
72
- . option ( '--template <path-to-template>' , 'use a non-standard application template' )
73
+ . allowUnknownOption ( )
73
74
. on ( '--help' , function ( ) {
74
75
console . log ( ' Only ' + chalk . green ( '<project-directory>' ) + ' is required.' ) ;
75
76
console . log ( ) ;
@@ -96,7 +97,12 @@ if (typeof projectName === 'undefined') {
96
97
process . exit ( 1 ) ;
97
98
}
98
99
99
- createApp ( projectName , program . verbose , program . scriptsVersion , program . template ) ;
100
+ var hiddenProgram = new commander . Command ( )
101
+ . option ( '--internal-testing-template <path-to-template>' , '(internal usage only, DO NOT RELY ON THIS) ' +
102
+ 'use a non-standard application template' )
103
+ . parse ( process . argv )
104
+
105
+ createApp ( projectName , program . verbose , program . scriptsVersion , hiddenProgram . internalTestingTemplate ) ;
100
106
101
107
function createApp ( name , verbose , version , template ) {
102
108
var root = path . resolve ( name ) ;
0 commit comments