create-expo-module
Advanced tools
Comparing version 0.8.5 to 0.8.6
@@ -75,3 +75,3 @@ "use strict"; | ||
console.log(); | ||
const packageManager = await (0, resolvePackageManager_1.resolvePackageManager)(); | ||
const packageManager = (0, resolvePackageManager_1.resolvePackageManager)(); | ||
const packagePath = options.source | ||
@@ -78,0 +78,0 @@ ? path_1.default.join(CWD, options.source) |
@@ -36,11 +36,3 @@ "use strict"; | ||
debug(`Using example template: ${template}`); | ||
const command = [ | ||
'create', | ||
'expo-app', | ||
'--', | ||
exampleProjectSlug, | ||
'--template', | ||
template, | ||
'--yes', | ||
]; | ||
const command = createCommand(packageManager, exampleProjectSlug, template); | ||
try { | ||
@@ -84,2 +76,9 @@ await (0, spawn_async_1.default)(packageManager, command, { | ||
exports.createExampleApp = createExampleApp; | ||
function createCommand(packageManager, exampleProjectSlug, template) { | ||
const command = ['create', 'expo-app']; | ||
if (packageManager === 'npm') { | ||
command.push('--'); | ||
} | ||
return command.concat([exampleProjectSlug, '--template', template, '--yes']); | ||
} | ||
/** | ||
@@ -86,0 +85,0 @@ * Copies files from one directory to another. |
{ | ||
"name": "create-expo-module", | ||
"version": "0.8.5", | ||
"version": "0.8.6", | ||
"description": "The script to create the Expo module", | ||
@@ -42,3 +42,3 @@ "main": "build/create-expo-module.js", | ||
"commander": "^8.3.0", | ||
"cross-spawn": "^7.0.3", | ||
"cross-spawn": "^7.0.5", | ||
"debug": "^4.3.4", | ||
@@ -61,3 +61,3 @@ "download-tarball": "^2.0.0", | ||
}, | ||
"gitHead": "563c85837bc5055672846887f70f3daf5763b16d" | ||
"gitHead": "128718d43bac2eaed764b3551469b95400f2363e" | ||
} |
@@ -108,3 +108,3 @@ import spawnAsync from '@expo/spawn-async'; | ||
const packageManager = await resolvePackageManager(); | ||
const packageManager = resolvePackageManager(); | ||
const packagePath = options.source | ||
@@ -111,0 +111,0 @@ ? path.join(CWD, options.source) |
@@ -44,11 +44,3 @@ import spawnAsync from '@expo/spawn-async'; | ||
debug(`Using example template: ${template}`); | ||
const command = [ | ||
'create', | ||
'expo-app', | ||
'--', | ||
exampleProjectSlug, | ||
'--template', | ||
template, | ||
'--yes', | ||
]; | ||
const command = createCommand(packageManager, exampleProjectSlug, template); | ||
try { | ||
@@ -102,2 +94,14 @@ await spawnAsync(packageManager, command, { | ||
function createCommand( | ||
packageManager: PackageManagerName, | ||
exampleProjectSlug: string, | ||
template: string | ||
): string[] { | ||
const command = ['create', 'expo-app']; | ||
if (packageManager === 'npm') { | ||
command.push('--'); | ||
} | ||
return command.concat([exampleProjectSlug, '--template', template, '--yes']); | ||
} | ||
/** | ||
@@ -104,0 +108,0 @@ * Copies files from one directory to another. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
147976
2158
Updatedcross-spawn@^7.0.5