Skip to content

Commit

Permalink
Add --skipBuild flag
Browse files Browse the repository at this point in the history
  • Loading branch information
osyrisrblx committed Oct 15, 2023
1 parent 6f47c85 commit 5b25204
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ interface InitOptions {
prettier?: boolean;
vscode?: boolean;
packageManager?: PackageManager;
skipBuild?: boolean;
}

enum InitMode {
Expand Down Expand Up @@ -371,7 +372,9 @@ async function init(argv: yargs.Arguments<InitOptions>, initMode: InitMode) {
await fs.copy(templateDir, cwd);
});

await benchmark("Compiling..", () => cmd("npm run build", cwd));
if (!argv.skipBuild) {
await benchmark("Compiling..", () => cmd(selectedPackageManager.build, cwd));
}
}

const GAME_DESCRIPTION = "Generate a Roblox place";
Expand Down Expand Up @@ -428,6 +431,10 @@ export = {
choices: Object.values(PackageManager),
describe: "Choose an alternative package manager",
})
.option("skipBuild", {
boolean: true,
describe: "Do not run build script",
})

.command([InitMode.Game, InitMode.Place], GAME_DESCRIPTION, {}, argv => init(argv as never, InitMode.Game))
.command(InitMode.Model, MODEL_DESCRIPTION, {}, argv => init(argv as never, InitMode.Model))
Expand Down

0 comments on commit 5b25204

Please sign in to comment.