Skip to content

Commit

Permalink
Make aws/cloudflare depend on pmtiles from npm [#455]
Browse files Browse the repository at this point in the history
This is clearer to developers than relying on the local code being built.
  • Loading branch information
bdon committed Jan 14, 2025
1 parent d374044 commit 27d5770
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 5 deletions.
2 changes: 1 addition & 1 deletion js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ See [protomaps-leaflet](https://github.com/protomaps/protomaps-leaflet)
Example of a PMTiles archive displayed in MapLibre GL JS:

```js
import { Protocol } from "pmtiles";
import { Protocol } from "pmtiles";
let protocol = new Protocol();
maplibregl.addProtocol("pmtiles",protocol.tile);
var style = {
Expand Down
31 changes: 30 additions & 1 deletion serverless/aws/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion serverless/aws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"dependencies": {
"@aws-sdk/client-s3": "^3.637.0",
"@smithy/node-http-handler": "^3.1.4"
"@smithy/node-http-handler": "^3.1.4",
"pmtiles": "^4.0.1"
}
}
2 changes: 1 addition & 1 deletion serverless/aws/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
ResolvedValueCache,
Source,
TileType,
} from "../../../js/src/index";
} from "pmtiles";
import { pmtiles_path, tile_path } from "../../shared/index";

import { createHash } from "crypto";
Expand Down
31 changes: 31 additions & 0 deletions serverless/cloudflare/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions serverless/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
"build": "wrangler deploy --outdir dist --dry-run",
"biome": "biome check --config-path=../../js/ src/index.ts --apply",
"biome-check": "biome check --config-path=../../js src/index.ts"
},
"dependencies": {
"pmtiles": "^4.0.1"
}
}
2 changes: 1 addition & 1 deletion serverless/cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ResolvedValueCache,
Source,
TileType,
} from "../../../js/src/index";
} from "pmtiles";
import { pmtiles_path, tile_path } from "../../shared/index";

interface Env {
Expand Down

0 comments on commit 27d5770

Please sign in to comment.