Skip to content

Commit 53b6249

Browse files
author
alexlee-dev
committed
✏️ Change APP Name to '___APP NAME___' in Templates
1 parent bbb919b commit 53b6249

File tree

8 files changed

+18
-15
lines changed

8 files changed

+18
-15
lines changed

src/init.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ export const copyTemplateFiles = async (
144144
path.join(root, "/.babelrc")
145145
);
146146
}
147+
148+
// * Apply the applicationName to template files
149+
147150
spinner.succeed("Template files copied successfully");
148151
} catch (error) {
149152
spinner.fail();

src/template/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<img width=256px height=256px src="https://svgshare.com/i/LWJ.svg" alt="Project logo"></a>
44
</p>
55

6-
<h3 align="center">APP NAME</h3>
6+
<h3 align="center">___APP NAME___</h3>
77

88
---
99

src/template/js/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import setup from "./setup";
99
const main = async () => {
1010
const menuActionEmitter = new EventEmitter.EventEmitter();
1111
menuActionEmitter.on("actionCompleted", async (state) => {
12-
await titleScreen("APP NAME");
12+
await titleScreen("___APP NAME___");
1313
await displayMainMenu(state);
1414
await interpretMenuAction(state);
1515
});
@@ -30,7 +30,7 @@ const main = async () => {
3030
clear();
3131
}
3232

33-
await titleScreen("APP NAME");
33+
await titleScreen("___APP NAME___");
3434
await displayMainMenu(state);
3535

3636
await interpretMenuAction(state);

src/template/js/src/menu.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const interpretMenuAction = async (state) => {
7171
}
7272
const actions = {
7373
about: async (state) => {
74-
await titleScreen("APP NAME");
74+
await titleScreen("___APP NAME___");
7575
console.log(
7676
boxen(chalk.yellow(`Author: `) + "YOUR NAME", blankBoxenStyle)
7777
);
@@ -81,7 +81,7 @@ export const interpretMenuAction = async (state) => {
8181
state.menuActionEmitter.emit("actionCompleted", state);
8282
},
8383
option1: async (state) => {
84-
await titleScreen("APP NAME");
84+
await titleScreen("___APP NAME___");
8585
console.log("Option 1 Logic would take place here :)");
8686
console.log("");
8787

@@ -90,7 +90,7 @@ export const interpretMenuAction = async (state) => {
9090
state.menuActionEmitter.emit("actionCompleted", state);
9191
},
9292
option2: async (state) => {
93-
await titleScreen("APP NAME");
93+
await titleScreen("___APP NAME___");
9494
console.log("Option 2 Logic would take place here :)");
9595
console.log("");
9696

@@ -99,7 +99,7 @@ export const interpretMenuAction = async (state) => {
9999
state.menuActionEmitter.emit("actionCompleted", state);
100100
},
101101
option3: async (state) => {
102-
await titleScreen("APP NAME");
102+
await titleScreen("___APP NAME___");
103103
console.log("Option 3 Logic would take place here :)");
104104
console.log("");
105105

src/template/js/src/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const setup = async (state) => {
88

99
console.log(
1010
`Welcome to ${chalk.yellowBright(
11-
"APP NAME"
11+
"___APP NAME___"
1212
)}! Let's walk you through the initial set up.\n`
1313
);
1414

src/template/ts/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { AppState } from "./types";
1010
const main = async (): Promise<void> => {
1111
const menuActionEmitter = new EventEmitter.EventEmitter();
1212
menuActionEmitter.on("actionCompleted", async (state: AppState) => {
13-
await titleScreen("APP NAME");
13+
await titleScreen("___APP NAME___");
1414
await displayMainMenu(state);
1515
await interpretMenuAction(state);
1616
});
@@ -31,7 +31,7 @@ const main = async (): Promise<void> => {
3131
clear();
3232
}
3333

34-
await titleScreen("APP NAME");
34+
await titleScreen("___APP NAME___");
3535
await displayMainMenu(state);
3636

3737
await interpretMenuAction(state);

src/template/ts/src/menu.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const interpretMenuAction = async (state: AppState): Promise<void> => {
7373
}
7474
const actions = {
7575
about: async (state: AppState): Promise<void> => {
76-
await titleScreen("APP NAME");
76+
await titleScreen("___APP NAME___");
7777
console.log(
7878
boxen(chalk.yellow(`Author: `) + "YOUR NAME", blankBoxenStyle)
7979
);
@@ -83,7 +83,7 @@ export const interpretMenuAction = async (state: AppState): Promise<void> => {
8383
state.menuActionEmitter.emit("actionCompleted", state);
8484
},
8585
option1: async (state: AppState): Promise<void> => {
86-
await titleScreen("APP NAME");
86+
await titleScreen("___APP NAME___");
8787
console.log("Option 1 Logic would take place here :)");
8888
console.log("");
8989

@@ -92,7 +92,7 @@ export const interpretMenuAction = async (state: AppState): Promise<void> => {
9292
state.menuActionEmitter.emit("actionCompleted", state);
9393
},
9494
option2: async (state: AppState): Promise<void> => {
95-
await titleScreen("APP NAME");
95+
await titleScreen("___APP NAME___");
9696
console.log("Option 2 Logic would take place here :)");
9797
console.log("");
9898

@@ -101,7 +101,7 @@ export const interpretMenuAction = async (state: AppState): Promise<void> => {
101101
state.menuActionEmitter.emit("actionCompleted", state);
102102
},
103103
option3: async (state: AppState): Promise<void> => {
104-
await titleScreen("APP NAME");
104+
await titleScreen("___APP NAME___");
105105
console.log("Option 3 Logic would take place here :)");
106106
console.log("");
107107

src/template/ts/src/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const setup = async (state: AppState): Promise<void> => {
99

1010
console.log(
1111
`Welcome to ${chalk.yellowBright(
12-
"APP NAME"
12+
"___APP NAME___"
1313
)}! Let's walk you through the initial set up.\n`
1414
);
1515

0 commit comments

Comments
 (0)