Skip to content

Commit

Permalink
Add typecheck to build
Browse files Browse the repository at this point in the history
  • Loading branch information
cwegrzyn committed May 24, 2024
1 parent 041dcdb commit d8be7ec
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esbuild.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { typecheckPlugin } from "@jgoz/esbuild-plugin-typecheck";
import builtins from "builtin-modules";
import esbuild from "esbuild";
import process from "process";
Expand All @@ -10,8 +11,6 @@ if you want to view the source, please visit the github repository of this plugi

const prod = process.argv[2] === "production";

const ASSETS = ["styles.css", "manifest.json"];

const context = await esbuild.context({
banner: {
js: banner,
Expand Down Expand Up @@ -40,6 +39,7 @@ const context = await esbuild.context({
sourcemap: prod ? false : "inline",
treeShaking: true,
outfile: prod ? "main.js" : "test-vault/.obsidian/plugins/forged/main.js",
plugins: [typecheckPlugin({ watch: !prod })],
});

const cssCtx = await esbuild.context({
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@codemirror/view": "^6.26.3",
"@datasworn/core": "0.0.10",
"@datasworn/starforged": "0.0.10",
"@jgoz/esbuild-plugin-typecheck": "^4.0.0",
"@nrsk/sigma": "^3.8.0",
"@popperjs/core": "^2.11.8",
"@swc/core": "^1.5.7",
Expand Down
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d8be7ec

Please sign in to comment.