Skip to content

Commit

Permalink
JS: make an ESM-only package, remove CommonJS [#287] (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon authored Jan 30, 2024
1 parent d7e24d0 commit 6bb1c68
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
"version": "3.0.0-alpha.0",
"description": "PMTiles archive decoder for browsers",
"type": "module",
"exports": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"types": "dist/index.d.ts",
"exports": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"source": "index.ts",
"files": [
"dist",
Expand All @@ -16,9 +13,8 @@
"scripts": {
"build-iife": "esbuild index.ts --outfile=dist/index.js --target=es6 --global-name=pmtiles --bundle --format=iife",
"build-esm": "esbuild index.ts --outfile=dist/index.mjs --target=es6 --global-name=pmtiles --bundle --format=esm",
"build-cjs": "esbuild index.ts --outfile=dist/index.cjs --target=es6 --global-name=pmtiles --bundle --format=cjs",
"build-tsc": "tsc --declaration --emitDeclarationOnly --outdir dist",
"build": "npm run build-iife && npm run build-esm && npm run build-cjs && npm run build-tsc",
"build": "npm run build-iife && npm run build-esm && npm run build-tsc",
"test": "tsx test/index.test.ts",
"tsc": "tsc --noEmit --watch",
"prettier": "prettier --write *.ts test/*.ts",
Expand Down

0 comments on commit 6bb1c68

Please sign in to comment.