scripts: move scripts to the project root directory
I believe, that these kind of scripts should reside there instead of src directory
This commit is contained in:
parent
b7f6a5fe91
commit
6a31473d22
4 changed files with 7 additions and 5 deletions
|
@ -12,6 +12,7 @@ RUN npx prisma generate
|
||||||
# Typescript compiling
|
# Typescript compiling
|
||||||
COPY tsconfig.json .
|
COPY tsconfig.json .
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
|
COPY scripts ./scripts
|
||||||
RUN npx tsc
|
RUN npx tsc
|
||||||
|
|
||||||
# Run the app
|
# Run the app
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "tsc && node dist/src/index.js",
|
"start": "tsc && node dist/src/index.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"publishCommands": "tsc && node dist/src/scripts/pushCommands.js"
|
"publishCommands": "tsc && node dist/scripts/pushCommands.js"
|
||||||
},
|
},
|
||||||
"author": "Wroclaw",
|
"author": "Wroclaw",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
// https://discordjs.guide/creating-your-bot/command-deployment.html#guild-commands
|
// https://discordjs.guide/creating-your-bot/command-deployment.html#guild-commands
|
||||||
|
|
||||||
import { REST, RESTGetAPIOAuth2CurrentApplicationResult, RESTPostAPIApplicationCommandsJSONBody, Routes } from "discord.js";
|
import { REST, RESTGetAPIOAuth2CurrentApplicationResult, RESTPostAPIApplicationCommandsJSONBody, Routes } from "discord.js";
|
||||||
import { config } from "../index";
|
import { config } from "../src/index";
|
||||||
import requireDirectory from "require-directory";
|
import requireDirectory from "require-directory";
|
||||||
|
|
||||||
import Command from "../command";
|
import Command from "../src/command";
|
||||||
|
|
||||||
const post: RESTPostAPIApplicationCommandsJSONBody[] = [];
|
const post: RESTPostAPIApplicationCommandsJSONBody[] = [];
|
||||||
|
|
||||||
const guildId = process.argv.slice(2)[0];
|
const guildId = process.argv.slice(2)[0];
|
||||||
requireDirectory<{default: Command}, void>(module, "../commands", {
|
requireDirectory<{default: Command}, void>(module, "../src/commands", {
|
||||||
visit: function (obj) {
|
visit: function (obj) {
|
||||||
console.log(obj);
|
console.log(obj);
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"include": [
|
"include": [
|
||||||
"./src/**/*"
|
"./src/**/*",
|
||||||
|
"./scripts/**/*"
|
||||||
],
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
|
|
Loading…
Reference in a new issue