Skip to content
This repository was archived by the owner on Dec 17, 2023. It is now read-only.

Commit 8ff58bd

Browse files
authored
Merge pull request #1 from tcaNPM/dev
add some things
2 parents 90c7020 + 56f996d commit 8ff58bd

File tree

4 files changed

+48
-10
lines changed

4 files changed

+48
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-djs-app",
3-
"version": "1.1.3",
3+
"version": "1.1.4-dev.3",
44
"description": "Create a Discord.js project easily.",
55
"main": "index.js",
66
"bin": {

src/functions.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ export async function initGit(options) {
8787
if (result.failed) {
8888
return Promise.reject(new Error("Failed to initialize git"));
8989
}
90+
91+
await execa("git", ["add", "-A"], {
92+
cwd: options.targetDirectory,
93+
});
94+
95+
await execa("git", ["commit", "-m", "Initial commit from Create DJS App"], {
96+
cwd: options.targetDirectory,
97+
});
98+
9099
return;
91100
}
92101

src/utils/questions.js

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,26 @@ export async function promptToken() {
6666
}
6767

6868
export async function promptGuildId() {
69-
const { guildId } = await inquirer.prompt({
70-
type: "input",
71-
name: "guildId",
72-
message: "What's your guild ID?",
73-
validate: (guildId) => {
74-
if (!guildId) return "Please enter a guild ID.";
75-
return true;
76-
},
69+
const { confirmGuildId } = await inquirer.prompt({
70+
type: "confirm",
71+
name: "confirmToken",
72+
message: "Do you want to enter your guild ID now?",
73+
default: true,
7774
});
7875

79-
return guildId;
76+
if (confirmGuildId) {
77+
const { guildId } = await inquirer.prompt({
78+
type: "input",
79+
name: "guildId",
80+
message: "What's your guild ID?",
81+
validate: (guildId) => {
82+
if (!guildId) return "Please enter a guild ID.";
83+
return true;
84+
},
85+
});
86+
87+
return guildId;
88+
} else return "";
8089
}
8190

8291
export async function promptTemplate() {

templates/typescript/tsconfig.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"compilerOptions": {
3+
"lib": ["ESNext"],
4+
"module": "commonjs",
5+
"moduleResolution": "node",
6+
"target": "ESNext",
7+
"outDir": "dist",
8+
"sourceMap": false,
9+
"esModuleInterop": true,
10+
"experimentalDecorators": true,
11+
"emitDecoratorMetadata": true,
12+
"allowSyntheticDefaultImports": true,
13+
"skipLibCheck": true,
14+
"skipDefaultLibCheck": true,
15+
"resolveJsonModule": true,
16+
"importHelpers": true
17+
},
18+
"include": ["src"],
19+
"exclude": ["node_modules", "**/*.spec.ts"]
20+
}

0 commit comments

Comments
 (0)