Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgryan committed May 9, 2024
1 parent b6e9595 commit 14dc034
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 7 deletions.
10 changes: 10 additions & 0 deletions docs/content/articles/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ the standard Leaflet assets should be included.
Leaflet-HTML is available via **npm** and **unpkg**.
To get started quickly, use the CDN version available on **unpkg**.

```html
<script type="importmap">
{
"imports": {
"leaflet": "https://unpkg.com/[email protected]/dist/leaflet.js"
}
}
</script>
```

```html
<script
type="module"
Expand Down
7 changes: 7 additions & 0 deletions docs/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""
></script>
<script type="importmap">
{
"imports": {
"leaflet": "https://unpkg.com/[email protected]/dist/leaflet.js"
}
}
</script>
<script
type="module"
src="https://unpkg.com/leaflet-html@latest/dist/leaflet-html.js"
Expand Down
7 changes: 7 additions & 0 deletions example/geojson/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""
></script>
<script type="importmap">
{
"imports": {
"leaflet": "https://unpkg.com/[email protected]/dist/leaflet.js"
}
}
</script>
<script type="module" src="/src/index.js"></script>
<style>
* {
Expand Down
7 changes: 7 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""
></script>
<script type="importmap">
{
"imports": {
"leaflet": "https://unpkg.com/[email protected]/dist/leaflet.js"
}
}
</script>
<script
src="/src/index.js"
type="module"
Expand Down
7 changes: 7 additions & 0 deletions example/overlays/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""
></script>
<script type="importmap">
{
"imports": {
"leaflet": "https://unpkg.com/[email protected]/dist/leaflet.js"
}
}
</script>
<script type="module" src="/src/index.js"></script>
<style>
* {
Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@
"version": "0.2.1",
"description": "Leaflet expressed in HTML",
"source": "src/index.js",
"main": "./dist/leaflet-html.js",
"umd:main": "./dist/leaflet-html.umd.js",
"exports": {
"module": "./dist/leaflet-html.js"
},
"module": "./dist/leaflet-html.esm.js",
"main": "./dist/leaflet-html.cjs",
"module": "./dist/leaflet-html.js",
"author": "andrewgryan",
"repository": {
"type": "git",
"url": "git+https://github.com/andrewgryan/leaflet-html.git"
},
"license": "MIT",
"scripts": {
"build": "microbundle --external leaflet",
"build": "microbundle",
"watch": "microbundle watch",
"test": "vitest"
},
Expand Down

0 comments on commit 14dc034

Please sign in to comment.