js 3.0.01: fix 3.0.0 packaging [#347] (#348)

* js 3.0.1; fix 3.0.0 packaging [#347]

* We can't have a .mjs alongside a .js, so rename the IIFE to pmtiles.js and the ES6 module to index.js.
This commit is contained in:
Brandon Liu
2024-02-03 23:01:46 +08:00
committed by GitHub
parent 067347cebb
commit a9977e3385
5 changed files with 8 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "pmtiles",
"version": "3.0.0",
"version": "3.0.1",
"description": "PMTiles archive decoder for browsers",
"type": "module",
"exports": "./dist/index.mjs",
@@ -11,8 +11,8 @@
"index.ts"
],
"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-iife": "esbuild index.ts --outfile=dist/pmtiles.js --target=es6 --global-name=pmtiles --bundle --format=iife",
"build-esm": "esbuild index.ts --outfile=dist/index.js --target=es6 --bundle --format=esm",
"build-tsc": "tsc --declaration --emitDeclarationOnly --outdir dist",
"build": "npm run build-iife && npm run build-esm && npm run build-tsc",
"test": "tsx test/index.test.ts",