@react-native-windows/cli
Advanced tools
Comparing version 0.0.0-canary.111 to 0.0.0-canary.112
@@ -49,2 +49,3 @@ "use strict"; | ||
const projectType = options.projectType; | ||
const language = options.language; | ||
// React-native init only allows alphanumerics in project names, but other | ||
@@ -59,2 +60,9 @@ // new project tools (like create-react-native-module) are less strict. | ||
} | ||
// Checking if we're overwriting an existing project and re-uses their projectGUID | ||
const existingProjectPath = path_1.default.join(destPath, windowsDir, newProjectName, newProjectName + (language === 'cs' ? '.csproj' : '.vcxproj')); | ||
let existingProjectGuid; | ||
if (fs_1.default.existsSync(existingProjectPath)) { | ||
console.log('Found existing project, extracting ProjectGuid.'); | ||
existingProjectGuid = (0, configUtils_1.findPropertyValue)((0, configUtils_1.readProjectFile)(existingProjectPath), 'ProjectGuid', existingProjectPath).replace(/[{}]/g, ''); | ||
} | ||
(0, generator_common_1.createDir)(path_1.default.join(destPath, windowsDir)); | ||
@@ -66,3 +74,2 @@ (0, generator_common_1.createDir)(path_1.default.join(destPath, windowsDir, newProjectName)); | ||
} | ||
const language = options.language; | ||
const namespaceCpp = toCppNamespace(namespace); | ||
@@ -78,3 +85,3 @@ if (options.experimentalNuGetDependency) { | ||
const sharedPath = path_1.default.join(srcRootPath, `shared-${projectType}`); | ||
const projectGuid = uuid_1.default.v4(); | ||
const projectGuid = existingProjectGuid || uuid_1.default.v4(); | ||
const rnwVersion = require(resolveRnwPath('package.json')).version; | ||
@@ -81,0 +88,0 @@ const nugetVersion = options.nuGetTestVersion || rnwVersion; |
{ | ||
"name": "@react-native-windows/cli", | ||
"version": "0.0.0-canary.111", | ||
"version": "0.0.0-canary.112", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "lib-commonjs/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
646089
5548