Skip to content

Commit

Permalink
feat: esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
kielingraphael committed Oct 17, 2023
1 parent e3c9f07 commit 8027d8c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 31 deletions.
29 changes: 0 additions & 29 deletions .swcrc

This file was deleted.

15 changes: 15 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { build } from 'esbuild'

const b = () =>
build({
bundle: true,
entryPoints: ['./src/index.js'],
banner: {
js: '#!/usr/bin/env node',
},
platform: 'node',
outfile: 'bin',
format: 'cjs',
})

Promise.all([b()])
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"doctorenv": "./bin"
},
"files": [
"bin"
"bin",
"README.md",
"package.json"
],
"scripts": {
"start": "tsx ./src/index.js",
Expand All @@ -16,7 +18,7 @@
"test": "vitest --run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"build": "swc ./src -d ./bin",
"build": "tsx build.js",
"publish": "npm run build && np"
},
"engines": {
Expand Down

0 comments on commit 8027d8c

Please sign in to comment.