Skip to content

Commit

Permalink
Fill in more package details (#213)
Browse files Browse the repository at this point in the history
Closes #210.

This fills in details that are expected in the `package.json` to better
represent the package on npm.
  • Loading branch information
ebrelsford authored Jun 27, 2024
1 parent 243d4fa commit 58e08bf
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
34 changes: 34 additions & 0 deletions js/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# maplibre-tile-spec

This package contains a JavaScript decoder for the experimental MapLibre Tile (MLT) vector tile format.

## Install

`npm install @maplibre/maplibre-tile-spec`

## Quick Start

To decode a tile, you will want to load `MltDecoder` and `TileSetMetadata`:

```js
import { MltDecoder, TileSetMetadata } from '@maplibre/maplibre-tile-spec';

const data = fs.readFileSync(tilePath);
const metadata = fs.readFileSync(metadataPath);
const tilesetMetadata = TileSetMetadata.fromBinary(metadata);
const tile = MltDecoder.decodeMlTile(data, tilesetMetadata);
```

## Contents

### Code

Code is in `src/`.

### Tests

Tests are in `test/unit/`. Run tests by running `npm run test`.

### Benchmarks

Benchmarks are in `bench/`. Run benchmarks by running `npm run bench`.
10 changes: 10 additions & 0 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
"files": [
"/dist/src"
],
"license": "(MIT OR Apache-2.0)",
"homepage": "https://github.com/maplibre/maplibre-tile-spec/#readme",
"keywords": [
"maplibre",
"gis",
"vector"
],
"scripts": {
"build": "tsc",
"prepare": "npm run build",
Expand All @@ -18,6 +25,9 @@
"type": "git",
"url": "git+https://github.com/maplibre/maplibre-tile-spec.git"
},
"bugs": {
"url": "https://github.com/maplibre/maplibre-tile-spec/issues"
},
"devDependencies": {
"@bufbuild/buf": "^1.34.0",
"@bufbuild/protoc-gen-es": "^1.10.0",
Expand Down

0 comments on commit 58e08bf

Please sign in to comment.