diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index a56f9fd6..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: protomaps diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index f8860183..478f3530 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -18,13 +18,15 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18.x - - run: cd js && npm install && npm run build + - run: cd js && npm ci && npm run build - run: echo "VITE_GIT_SHA=$(git rev-parse --short HEAD)" >> app/.env - - run: cd app && npm install && ./node_modules/.bin/tsc && npm run prettier-check && ./node_modules/.bin/vite build --base=/PMTiles/ - - run: cd serverless/aws && npm install && npx tsc && npm run build && cp dist/lambda_function.zip ../../app/dist - - run: cd serverless/cloudflare && cp wrangler.toml.example wrangler.toml && npm install && npx tsc && npm run build && cp dist/index.js ../../app/dist + - run: cd app && npm ci && ./node_modules/.bin/tsc && npm run prettier-check && ./node_modules/.bin/vite build + - run: cd serverless/aws && npm ci && npx tsc && npm run biome-check && npm run build-zip && cp dist/lambda_function.zip ../../app/dist && npm run build-cloudformation-stack && cp dist/cloudformation-stack.yaml ../../app/dist + - run: cd serverless/cloudflare && cp wrangler.toml.example wrangler.toml && npm ci && npx tsc && npm run biome-check && npm run build && cp dist/index.js ../../app/dist - run: cd spec/v3 && cp *.pmtiles ../../app/dist - run: cd js/examples && mkdir ../../app/dist/examples && cp *.html ../../app/dist/examples/ + - run: cd js && npm ci && npx typedoc src/index.ts --out ../app/dist/typedoc + - run : cd openlayers && npm ci && npm run tsc - run: cd openlayers/examples && mkdir ../../app/dist/examples/openlayers && cp *.html ../../app/dist/examples/openlayers - name: build_app uses: peaceiris/actions-gh-pages@v3 @@ -33,6 +35,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./app/dist force_orphan: true + cname: pmtiles.io test: runs-on: ubuntu-latest @@ -44,9 +47,9 @@ jobs: with: node-version: 18.x - run: python .github/check_examples.py - - run: cd js && npm install && npm test - - run: cd js && npm run prettier-check + - run: cd js && npm ci && npm test + - run: cd js && npm run biome-check - run: cd python && python -m unittest test/test_* - run: cd cpp && make - - run: cd serverless/cloudflare && npm install && npm test - - run: cd serverless/vtfilter && npm install && npm test + - run: cd serverless/cloudflare && npm ci && npm test + - run: cd serverless/vtfilter && npm ci && npm test diff --git a/README.md b/README.md index 4708dbe2..cfa96e98 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ [![npm](https://img.shields.io/npm/v/pmtiles)](https://www.npmjs.com/package/pmtiles) -[![js minzipped size](https://img.shields.io/bundlephobia/minzip/pmtiles)](https://bundlephobia.com/package/pmtiles) [![pypi](https://img.shields.io/pypi/v/pmtiles)](https://pypi.org/project/pmtiles/) -๐ **PMTiles Viewer:** [https://protomaps.github.io/PMTiles/](https://protomaps.github.io/PMTiles/) ๐ +๐ **PMTiles Viewer:** [https://pmtiles.io/](https://pmtiles.io) ๐ # PMTiles @@ -10,10 +9,10 @@ PMTiles is a single-file archive format for tiled data. A PMTiles archive can be * [Protomaps Blog: Dynamic Maps, Static Storage](http://protomaps.com/blog/dynamic-maps-static-storage) -* [PMTiles Viewer](https://protomaps.github.io/PMTiles/) - inspect and preview PMTiles local or remote PMTiles archives. +* [PMTiles Viewer](https://pmtiles.io) - inspect and preview PMTiles local or remote PMTiles archives. * Archives on cloud storage may require CORS for the origin `https://protomaps.github.io` -* [Vector Tiles Example (US Zip Codes)](https://protomaps.github.io/PMTiles/?url=https%3A%2F%2Fr2-public.protomaps.com%2Fprotomaps-sample-datasets%2Fcb_2018_us_zcta510_500k.pmtiles) +* [Vector Tiles Example (US Zip Codes)](https://pmtiles.io/?url=https%3A%2F%2Fr2-public.protomaps.com%2Fprotomaps-sample-datasets%2Fcb_2018_us_zcta510_500k.pmtiles) Demos require MapLibre GL JS v1.15 or later. @@ -26,7 +25,7 @@ See also: Download the `pmtiles` binary for your system at [go-pmtiles/Releases](https://github.com/protomaps/go-pmtiles/releases). pmtiles convert INPUT.mbtiles OUTPUT.pmtiles - pmtiles upload OUTPUT.mbtiles s3://my-bucket?region=us-west-2 // requires AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY env vars to be set + pmtiles upload OUTPUT.pmtiles s3://my-bucket?region=us-west-2 // requires AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY env vars to be set ## Consuming PMTiles diff --git a/app/biome.json b/app/biome.json new file mode 100644 index 00000000..a3c305d0 --- /dev/null +++ b/app/biome.json @@ -0,0 +1,20 @@ +{ + "javascript": { + "formatter": { + "trailingComma": "es5" + } + }, + "formatter": { + "indentStyle": "space" + }, + "linter": { + "rules": { + "style": { + "useNamingConvention": {} + }, + "nursery": { + "noUnusedImports": {} + } + } + } +} diff --git a/app/index.html b/app/index.html index b0fddd7c..2cb05b7f 100644 --- a/app/index.html +++ b/app/index.html @@ -8,6 +8,6 @@
- +