change ol-pmtiles to TypeScript [#312] (#444)

* change ol-pmtiles to TypeScript [#444]

* olpmtiles: 1.0.0
* accept either a string or pmtiles.Source for the url option
* package.json works for ESM/CJS/IIFE [#312, #443]
* replace npm install with npm ci on github actions
This commit is contained in:
Brandon Liu
2024-09-11 16:36:48 +08:00
committed by GitHub
parent 089d13d637
commit ab5534df7e
11 changed files with 2429 additions and 580 deletions

View File

@@ -1,14 +1,27 @@
{
"name": "ol-pmtiles",
"version": "0.5.0",
"version": "1.0.0",
"description": "PMTiles sources for OpenLayers",
"type": "module",
"exports": [
"./src/index.js"
],
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
}
},
"files": [
"./dist/olpmtiles.js",
"./src/index.js"
"dist",
"src"
],
"repository": {
"type": "git",
@@ -23,15 +36,17 @@
],
"license": "BSD-3-Clause",
"scripts": {
"build-iife": "esbuild src/script_includes.js --outfile=dist/olpmtiles.js --target=es6 --global-name=olpmtiles --bundle --format=iife",
"build": "tsup",
"tsc": "tsc --noEmit --skipLibCheck",
"prettier": "prettier --write *.js",
"prettier-check": "prettier --check *.js"
},
"dependencies": {
"pmtiles": "^3.0.4"
"pmtiles": "^3.0.7"
},
"devDependencies": {
"esbuild": "^0.15.11"
"tsup": "^8.2.3",
"typescript": "^4.5.5"
},
"peerDependencies": {
"ol": ">=9.0.0"