mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(webpack): allow custom 'projectName' on Xcode project name from config (#10550)
This commit is contained in:
@@ -3,6 +3,7 @@ import { basename } from "path";
|
||||
import { INativeScriptPlatform } from "../helpers/platform";
|
||||
import { getProjectRootPath } from "../helpers/project";
|
||||
import { env } from '../';
|
||||
import { getValue } from '../helpers/config';
|
||||
|
||||
function sanitizeName(appName: string): string {
|
||||
return appName.split("").filter((c) =>
|
||||
@@ -10,7 +11,9 @@ function sanitizeName(appName: string): string {
|
||||
).join("");
|
||||
}
|
||||
function getDistPath() {
|
||||
const appName = sanitizeName(basename(getProjectRootPath()));
|
||||
// try projectName from nativescript.config.ts, if not set, use original method
|
||||
const appName = getValue('projectName') ?? sanitizeName(basename(getProjectRootPath()));
|
||||
|
||||
return `${env.buildPath ?? "platforms"}/ios/${appName}/app`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user