@@ -43,23 +43,23 @@ const _wpThemeVersion = packageJson.version;
43
43
const _createReactAppVersion = _wpThemeVersion . split ( "-wp." ) [ 0 ] ;
44
44
45
45
// Check these!!!!
46
- const _reactScriptsWpThemeVersion = "^3.4.0-wp.1 " ;
47
- const _getScriptsPath = function ( ) {
46
+ const _reactScriptsWpThemeVersion = "^3.4.0-wp.2 " ;
47
+ const _getScriptsPath = function ( ) {
48
48
return scriptsFromNpm ( ) ;
49
49
} ;
50
50
51
- const scriptsFromNpm = function ( ) {
51
+ const scriptsFromNpm = function ( ) {
52
52
//console.log("SCRIPTS FROM NPM");
53
53
return {
54
- path : `@devloco/react-scripts-wptheme@${ _reactScriptsWpThemeVersion } `
54
+ path : `@devloco/react-scripts-wptheme@${ _reactScriptsWpThemeVersion } ` ,
55
55
} ;
56
56
} ;
57
57
58
- const scriptsFromGit = function ( ) {
58
+ const scriptsFromGit = function ( ) {
59
59
console . log ( "SCRIPTS FROM GIT" ) ;
60
60
const deleteFolderRecursive = ( path ) => {
61
61
if ( fs . existsSync ( path ) ) {
62
- fs . readdirSync ( path ) . forEach ( function ( file ) {
62
+ fs . readdirSync ( path ) . forEach ( function ( file ) {
63
63
let curPath = path + "/" + file ;
64
64
if ( fs . statSync ( curPath ) . isDirectory ( ) ) {
65
65
// recurse
@@ -84,9 +84,9 @@ const scriptsFromGit = function() {
84
84
let scriptsPath = "file:" + path . join ( tempPath , "create-react-app" , "packages" , "react-scripts" ) ;
85
85
return {
86
86
path : scriptsPath ,
87
- callback : function ( ) {
87
+ callback : function ( ) {
88
88
deleteFolderRecursive ( tempPath ) ;
89
- }
89
+ } ,
90
90
} ;
91
91
} ;
92
92
@@ -122,11 +122,11 @@ if (program.info) {
122
122
Binaries : [ "Node" , "npm" , "Yarn" ] ,
123
123
Browsers : [ "Chrome" , "Edge" , "Internet Explorer" , "Firefox" , "Safari" ] ,
124
124
npmPackages : [ "react" , "react-dom" , "react-scripts" ] ,
125
- npmGlobalPackages : [ "create-react-app" ]
125
+ npmGlobalPackages : [ "create-react-app" ] ,
126
126
} ,
127
127
{
128
128
duplicates : true ,
129
- showNotFound : true
129
+ showNotFound : true ,
130
130
}
131
131
)
132
132
. then ( console . log ) ;
@@ -199,7 +199,7 @@ function createWpTheme(root, appName, version, verbose, originalDirectory, templ
199
199
. then ( ( packageName ) =>
200
200
checkIfOnline ( useYarn ) . then ( ( isOnline ) => ( {
201
201
isOnline : isOnline ,
202
- packageName : packageName
202
+ packageName : packageName ,
203
203
} ) )
204
204
)
205
205
. then ( ( info ) => {
@@ -241,14 +241,14 @@ function createReactApp(createWpThemeReactRoot, appName, version, verbose, origi
241
241
args . push ( scriptsPath . path ) ;
242
242
243
243
const child = spawn ( command , args , { stdio : "inherit" } )
244
- . on ( "error" , function ( err ) {
244
+ . on ( "error" , function ( err ) {
245
245
console . log ( `createReactWpTheme.js ERROR for command: ${ command } ${ args . join ( " " ) } ` ) ;
246
246
throw err ;
247
247
} )
248
248
. on ( "close" , ( code ) => {
249
249
if ( code !== 0 ) {
250
250
reject ( {
251
- command : `${ command } ${ args . join ( " " ) } `
251
+ command : `${ command } ${ args . join ( " " ) } ` ,
252
252
} ) ;
253
253
254
254
return ;
@@ -288,9 +288,7 @@ function getProxy() {
288
288
} else {
289
289
try {
290
290
// Trying to read https-proxy from .npmrc
291
- let httpsProxy = execSync ( "npm config get https-proxy" )
292
- . toString ( )
293
- . trim ( ) ;
291
+ let httpsProxy = execSync ( "npm config get https-proxy" ) . toString ( ) . trim ( ) ;
294
292
return httpsProxy !== "null" ? httpsProxy : undefined ;
295
293
} catch ( e ) {
296
294
return ;
0 commit comments