Skip to content

Commit

Permalink
feat: euphoria template added to init command.
Browse files Browse the repository at this point in the history
  • Loading branch information
ispyhumanfly committed Oct 27, 2023
1 parent c41848f commit 8b4ba52
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/iniquity/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class Init implements yargs.CommandModule {
.options("template", {
type: "string",
default: "default",
choices: ["default", "eternity", "mybbs"],
choices: ["default", "eternity", "mybbs", "euphoria"],
describe: "Specify a template to use when constructing your new iniquity bbs.",
demandOption: false
})
Expand Down Expand Up @@ -94,6 +94,13 @@ export class Init implements yargs.CommandModule {
copyfiles([path.join(__dirname, "../../../../templates/src/eternity/.vscode/*"), ".vscode"], { up: true, all: true }, (err) => {})
}

if (argv.template === "euphoria") {
copyfiles([path.join(__dirname, "../../../../templates/src/euphoria/*"), "."], { up: true, all: true }, (err) => {})
copyfiles([path.join(__dirname, "../../../../templates/src/euphoria/.iniquity/*"), ".iniquity"], { up: true, all: true }, (err) => {})
copyfiles([path.join(__dirname, "../../../../templates/src/euphoria/.vscode/*"), ".vscode"], { up: true, all: true }, (err) => {})
copyfiles([path.join(__dirname, "../../../../templates/src/euphoria/assets/*"), "assets"], { up: true, all: true }, (err) => {})
}

console.log(`Iniquity template ${argv.template} installed.`)

setTimeout(() => {
Expand Down

0 comments on commit 8b4ba52

Please sign in to comment.