raise the ES target level and enable sourcemaps in tsconfig.json

This commit is contained in:
Dmytro Meleshko 2021-01-29 19:07:39 +02:00
parent 417bfc8a18
commit 593efb3602
2 changed files with 14 additions and 9 deletions

View File

@ -182,12 +182,16 @@ export async function loadCommands(): Promise<Collection<string, Command>> {
if (cmd.isDirectory()) {
if (cmd.name === "subcommands") continue;
else $.warn(`You can't have multiple levels of directories! From: "dist/commands/${cmd.name}"`);
} else loadCommand(cmd.name, list, selected.name);
} else if (cmd.name.endsWith(".js")) {
loadCommand(cmd.name, list, selected.name);
}
}
subdir.close();
categories.set(category, list);
} else loadCommand(selected.name, listMisc);
} else if (selected.name.endsWith(".js")) {
loadCommand(selected.name, listMisc);
}
}
dir.close();
@ -236,7 +240,7 @@ export default new Command({
permission: null,
aliases: [],
async run($: CommonLibrary): Promise<any> {
},
subcommands: {
layer: new Command({
@ -246,7 +250,7 @@ export default new Command({
permission: null,
aliases: [],
async run($: CommonLibrary): Promise<any> {
}
})
},
@ -256,7 +260,7 @@ export default new Command({
usage: '',
permission: null,
async run($: CommonLibrary): Promise<any> {
}
}),
number: new Command({
@ -265,7 +269,7 @@ export default new Command({
usage: '',
permission: null,
async run($: CommonLibrary): Promise<any> {
}
}),
any: new Command({
@ -274,7 +278,7 @@ export default new Command({
usage: '',
permission: null,
async run($: CommonLibrary): Promise<any> {
}
})
});`;

View File

@ -2,7 +2,7 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"target": "ES6",
"target": "es2019",
"module": "CommonJS",
"moduleResolution": "node",
"esModuleInterop": true,
@ -11,7 +11,8 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"removeComments": true
"removeComments": true,
"sourceMap": true
},
"exclude": ["test"]
}