Skip to content

Commit

Permalink
Ensure that ui/dist is created with npm start
Browse files Browse the repository at this point in the history
Change-Id: Ia3d89ebba3398d1ba5c5ed5fed2ed0e5dd5e747f
  • Loading branch information
mohabfekry committed Jun 3, 2024
1 parent 711ba33 commit 5b4bbcd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ class ClaspManager {
static async create(
title: string,
scriptRootDir: string,
filesRootDir: string
filesRootDir = "ui"
) {
fs.ensureDirSync(scriptRootDir);
fs.ensureDirSync(path.join(filesRootDir, scriptRootDir));
const res = spawn.sync(
"npx",
[
Expand All @@ -89,7 +89,7 @@ class ClaspManager {
"--rootDir",
scriptRootDir,
"--title",
`${title}`,
title,
],
{ encoding: "utf-8" }
);
Expand All @@ -102,6 +102,7 @@ class ClaspManager {
path.join(filesRootDir, ".clasp-dev.json"),
path.join(filesRootDir, ".clasp-prod.json")
);
await fs.remove(path.join(scriptRootDir, "appsscript.json"));
const output = res.output.join();

return {
Expand Down Expand Up @@ -160,7 +161,7 @@ export class UiDeploymentHandler {
}
console.log();
console.log("Creating Apps Script Project...");
const res = await ClaspManager.create("ViGenAiR", "./dist", "./ui");
const res = await ClaspManager.create("ViGenAiR", "./dist");
console.log();
console.log("IMPORTANT -> Google Sheets Link:", res.sheetLink);
console.log("IMPORTANT -> Apps Script Link:", res.scriptLink);
Expand Down

0 comments on commit 5b4bbcd

Please sign in to comment.