Skip to content

Commit

Permalink
feat: bundle package
Browse files Browse the repository at this point in the history
  • Loading branch information
ext committed Mar 19, 2024
1 parent 34fb6d2 commit 5e7f40b
Show file tree
Hide file tree
Showing 34 changed files with 708 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trim_trailing_whitespace = true
indent_style = tab
charset = utf-8

[*.js]
[*.js,*.mjs]
indent_style = space
indent_size = 2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run semantic-release
run: npm exec semantic-release
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,5 @@ $RECYCLE.BIN/
*.lnk

# End of https://www.gitignore.io/api/macos,windows,linux,node

dist/
16 changes: 16 additions & 0 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import fs from "node:fs/promises";
import { build } from "esbuild";

const pkg = JSON.parse(await fs.readFile("package.json", "utf-8"));
const { externalDependencies } = pkg;

build({
entryPoints: ["src/index.js"],
bundle: true,
outdir: "dist",
platform: "node",
target: "node18",
format: "esm",
logLevel: "info",
external: externalDependencies,
});
Loading

0 comments on commit 5e7f40b

Please sign in to comment.