Skip to content

Commit

Permalink
add a usable developer-instruction if the assetDir is not named out
Browse files Browse the repository at this point in the history
  • Loading branch information
nomo-app committed Dec 9, 2023
1 parent ed0d16d commit fb8efac
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/build-webon/build-webon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,21 @@ export async function deleteExistingTarFile(
}

export async function buildWebOn(assetDir: string): Promise<void> {
const isOutDir = assetDir.endsWith("/out");
const outDirPath = isOutDir ? assetDir : path.resolve(assetDir, "..", "out");

checkDir(assetDir);
//renameAssetDir(assetDir);

// if (!isOutDir) {
// console.log("Directories are already named correctly, no need to rename.");
// }
// path.basename word for both Linux and Windows
const isOutDir = path.basename(assetDir) === "out";
const outDirPath = isOutDir ? assetDir : path.resolve(assetDir, "..", "out");

// createOutDir(outDirPath);
if (!isOutDir) {
logFatal(
"The assetDir must be named 'out'. If needed, please add a mv-command to your build-script for renaming " +
getDebugPath(assetDir) +
" into " +
getDebugPath(outDirPath) +
"."
);
}

const missingFiles = checkRequiredFiles(outDirPath);

Expand Down

0 comments on commit fb8efac

Please sign in to comment.