mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 02:41:09 +00:00
* Make package.json main es6 module instead of cjs [#317, #248] * remove use of package.json main, instead use exports for dual es6/cjs modules [#317, #248] * replace esbuild-runner with tsx [#477]
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
"name": "pmtiles",
|
||||
"version": "2.11.0",
|
||||
"description": "PMTiles archive decoder for browsers",
|
||||
"main": "dist/index.cjs",
|
||||
"module": "dist/index.mjs",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"types": "dist/index.d.ts",
|
||||
"source": "index.ts",
|
||||
"files": [
|
||||
@@ -16,7 +19,7 @@
|
||||
"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",
|
||||
"test": "node -r esbuild-runner/register test/index.test.ts",
|
||||
"test": "tsx test/index.test.ts",
|
||||
"tsc": "tsc --noEmit --watch",
|
||||
"prettier": "prettier --write *.ts test/*.ts",
|
||||
"prettier-check": "prettier --check *.ts test/*.ts"
|
||||
@@ -27,8 +30,8 @@
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.11.9",
|
||||
"esbuild": "^0.15.11",
|
||||
"esbuild-runner": "^2.2.1",
|
||||
"prettier": "^2.8.4",
|
||||
"tsx": "^4.7.0",
|
||||
"typescript": "^4.5.5"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user