mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(wepback): custom buildPathsupport (#10477)
Co-authored-by: farfromrefuge <dev@akylas.fr>
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { INativeScriptPlatform } from "../helpers/platform";
|
||||
import { env } from '../';
|
||||
|
||||
function getDistPath() {
|
||||
return `platforms/android/app/src/main/assets/app`;
|
||||
return `${env.buildPath ?? "platforms"}/android/app/src/main/assets/app`;
|
||||
}
|
||||
|
||||
const AndroidPlatform: INativeScriptPlatform = {
|
||||
|
||||
@@ -2,6 +2,7 @@ import { basename } from "path";
|
||||
|
||||
import { INativeScriptPlatform } from "../helpers/platform";
|
||||
import { getProjectRootPath } from "../helpers/project";
|
||||
import { env } from '../';
|
||||
|
||||
function sanitizeName(appName: string): string {
|
||||
return appName.split("").filter((c) =>
|
||||
@@ -10,7 +11,7 @@ function sanitizeName(appName: string): string {
|
||||
}
|
||||
function getDistPath() {
|
||||
const appName = sanitizeName(basename(getProjectRootPath()));
|
||||
return `platforms/ios/${appName}/app`;
|
||||
return `${env.buildPath ?? "platforms"}/ios/${appName}/app`;
|
||||
}
|
||||
|
||||
const iOSPlatform: INativeScriptPlatform = {
|
||||
|
||||
@@ -2,6 +2,7 @@ import { basename } from "path";
|
||||
|
||||
import { INativeScriptPlatform } from "../helpers/platform";
|
||||
import { getProjectRootPath } from "../helpers/project";
|
||||
import { env } from '../';
|
||||
|
||||
function sanitizeName(appName: string): string {
|
||||
return appName.split("").filter((c) =>
|
||||
@@ -10,7 +11,7 @@ function sanitizeName(appName: string): string {
|
||||
}
|
||||
function getDistPath() {
|
||||
const appName = sanitizeName(basename(getProjectRootPath()));
|
||||
return `platforms/visionos/${appName}/app`;
|
||||
return `${env.buildPath ?? "platforms"}/visionos/${appName}/app`;
|
||||
}
|
||||
|
||||
const visionOSPlatform: INativeScriptPlatform = {
|
||||
|
||||
Reference in New Issue
Block a user