Skip to content

Commit

Permalink
fix: emit declarations and lib via tsc (#76)
Browse files Browse the repository at this point in the history
This changes from using esbuild to emit library code, and instead uses
typescript itself.

We don't currently ship type declarations since esbuild will not output
them.
  • Loading branch information
43081j authored Dec 29, 2023
1 parent 11c9aa9 commit e732123
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"pretest:node": "npm run build",
"test:node": "mocha",
"build": "npm run build:lib && npm run build:esm-bundle && npm run build:cjs-bundle",
"build:lib": "esbuild \"src/*.ts\" --outdir=lib --format=esm",
"build:lib": "tsc",
"build:esm-bundle": "esbuild --bundle src/index.ts --outfile=loupe.js --format=esm",
"build:cjs-bundle": "esbuild --bundle src/index.ts --outfile=loupe.js --format=cjs",
"upload-coverage": "codecov"
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"isolatedModules": true,
"useDefineForClassFields": true,
"target": "es2018",
"noEmit": true,
"allowImportingTsExtensions": true,
"outDir": "./lib",
"lib": ["es2022", "dom"],
"strict": true,
"declaration": true,
Expand Down

0 comments on commit e732123

Please sign in to comment.