diff --git a/.gitignore b/.gitignore index 024eab122..c5205da17 100644 --- a/.gitignore +++ b/.gitignore @@ -2,31 +2,6 @@ debug.ts configs.ts -.DS_Store -.lock - -# Node modules - npm -node_modules/ - -# Log files -npm-debug.log* - -# Docs -dist/ -public/ -.cache/ - -# IntelliJ IDEA -.idea/ - -# Windows -desktop.ini - -# Visual Studio Code -.vscode/* -!.vscode/tasks.json -!.vscode/launch.json -*.code-workspace - -# Sublime Text -.sublime-project \ No newline at end of file +# npm stuff +.npmignore +package.json \ No newline at end of file diff --git a/dnt.ts b/dnt.ts new file mode 100644 index 000000000..bfc971a36 --- /dev/null +++ b/dnt.ts @@ -0,0 +1,21 @@ +import { build } from "https://deno.land/x/dnt@0.6.0/mod.ts"; +import { DISCORDENO_VERSION } from "./mod.ts"; + +await Deno.remove("npm", { recursive: true }).catch((_) => {}); + +await build({ + entryPoints: ["./mod.ts"], + outDir: "./npm", + typeCheck: false, + declaration: true, + test: false, + package: { + name: "discordeno", + version: DISCORDENO_VERSION, + }, + compilerOptions: { target: "ES2020" }, +}); + +// post build steps +Deno.copyFileSync("LICENSE", "npm/LICENSE"); +Deno.copyFileSync("README.md", "npm/README.md");