Skip to content

Commit

Permalink
Merge pull request #103 from henrythasler/feature/bump-versions
Browse files Browse the repository at this point in the history
Feature/bump versions
  • Loading branch information
henrythasler committed Oct 2, 2023
2 parents fe8d2cb + 44e6a3b commit 505f1e6
Show file tree
Hide file tree
Showing 57 changed files with 15,350 additions and 7,392 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-env node */
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
root: true,
parserOptions: {
project: ['./tsconfig.json'],
}
};
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
Expand All @@ -39,3 +38,4 @@ jobs:
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"

7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": false,
"printWidth": 120,
"tabWidth": 4
}
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@ Leaflet.Geodesic is available via CDN. Add the following snippet to your html-fi

```html
<!-- Make sure you put this AFTER leaflet.js -->
<script src="https://cdn.jsdelivr.net/npm/leaflet.geodesic"></script>
<script src="https://cdn.jsdelivr.net/npm/leaflet.geodesic">
integrity="see-release-page-for-current-checksum"
crossorigin=""></script>
```

Leaflet.Geodesic is available from [unpkg](https://unpkg.com/browse/leaflet.geodesic/), [jsDelivr](https://www.jsdelivr.com/package/npm/leaflet.geodesic) and [npmjs](https://www.npmjs.com/package/leaflet.geodesic).
Leaflet.Geodesic is available via the following CDNs:

- [unpkg](https://unpkg.com/browse/leaflet.geodesic/)
- [jsDelivr](https://www.jsdelivr.com/package/npm/leaflet.geodesic)
- [npmjs](https://www.npmjs.com/package/leaflet.geodesic)

Add it in your nodejs-project with `npm i leaflet.geodesic`.

If possible, pin the plug-in to a specific version and use [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity). Check the [release page](https://github.com/henrythasler/Leaflet.Geodesic/releases) for the latest version, links and checksum. A checksum can by verified with `npm run build`, is stored in `dist/leaflet.geodesic.umd.min.js.sha512` on [jsDelivr](https://www.jsdelivr.com/package/npm/leaflet.geodesic?path=dist) and [unpkg](https://unpkg.com/browse/leaflet.geodesic/dist/leaflet.geodesic.umd.min.js.sha512) and is shown in the [build-log](https://app.travis-ci.com/github/henrythasler/Leaflet.Geodesic/builds) for a tagged version.
It is good practice, to pin the plug-in to a specific version and use [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity). Check the [release page](https://github.com/henrythasler/Leaflet.Geodesic/releases) for the latest version, links and checksum. A checksum can by verified with `npm run build`, is stored in `dist/leaflet.geodesic.umd.min.js.sha512` on [jsDelivr](https://www.jsdelivr.com/package/npm/leaflet.geodesic?path=dist) and [unpkg](https://unpkg.com/browse/leaflet.geodesic/dist/leaflet.geodesic.umd.min.js.sha512) and is shown in the [build-log](https://app.travis-ci.com/github/henrythasler/Leaflet.Geodesic/builds) for a tagged version.

## Basic usage

Expand All @@ -45,15 +51,15 @@ const geodesicLine = L.geodesic().addTo(map); // lower-case, w/o new-keyword
const geodesicCircle = L.geodesiccircle().addTo(map); // lower-case, w/o new-keyword
```

Make sure you add the geodesic-object to the map. It won't display otherwise.
Make sure you add the geodesic-object to the map (`.addTo(map)`). It won't display otherwise.

Each constructor is defined as:
```JavaScript
Geodesic(latlngs?: L.LatLngExpression[] | L.LatLngExpression[][], options?: GeodesicOptions)
GeodesicCircle(center?: L.LatLngExpression, options?: GeodesicOptions)
```

Both classes are extended from [L.Polyline](http://leafletjs.com/reference.html#polyline), so all methods, events and options for `L.Polyline` can be used with `L.Geodesic` and `L.GeodesicCircle` here as well. Any alt-properties provided via L.LatLng() points are preserved by `L.Geodesic`.
Both classes are extended from [L.Polyline](http://leafletjs.com/reference.html#polyline), so all methods, events and options for `L.Polyline` can be used with `L.Geodesic` and `L.GeodesicCircle` here as well. Any [alt-properties](https://leafletjs.com/reference.html#latlng-l-latlng) given with any points are preserved by `L.Geodesic`.

## Geodesic Lines

Expand Down
37 changes: 15 additions & 22 deletions docs/api/assets/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,24 @@
--dark-hl-2: #569CD6;
--light-hl-3: #000000FF;
--dark-hl-3: #D4D4D4;
--light-hl-4: #FF0000;
--light-hl-4: #E50000;
--dark-hl-4: #9CDCFE;
--light-hl-5: #0000FF;
--dark-hl-5: #CE9178;
--light-hl-6: #0000FF;
--dark-hl-6: #569CD6;
--light-hl-6: #001080;
--dark-hl-6: #9CDCFE;
--light-hl-7: #000000;
--dark-hl-7: #D4D4D4;
--light-hl-8: #0070C1;
--dark-hl-8: #4FC1FF;
--light-hl-9: #795E26;
--dark-hl-9: #DCDCAA;
--light-hl-10: #001080;
--dark-hl-10: #9CDCFE;
--light-hl-11: #098658;
--dark-hl-11: #B5CEA8;
--light-hl-12: #A31515;
--dark-hl-12: #CE9178;
--light-hl-13: #267F99;
--dark-hl-13: #4EC9B0;
--light-hl-8: #A31515;
--dark-hl-8: #CE9178;
--light-hl-9: #0000FF;
--dark-hl-9: #569CD6;
--light-hl-10: #0070C1;
--dark-hl-10: #4FC1FF;
--light-hl-11: #795E26;
--dark-hl-11: #DCDCAA;
--light-hl-12: #098658;
--dark-hl-12: #B5CEA8;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}
Expand All @@ -45,7 +43,6 @@
--hl-10: var(--light-hl-10);
--hl-11: var(--light-hl-11);
--hl-12: var(--light-hl-12);
--hl-13: var(--light-hl-13);
--code-background: var(--light-code-background);
} }

Expand All @@ -63,11 +60,10 @@
--hl-10: var(--dark-hl-10);
--hl-11: var(--dark-hl-11);
--hl-12: var(--dark-hl-12);
--hl-13: var(--dark-hl-13);
--code-background: var(--dark-code-background);
} }

body.light {
:root[data-theme='light'] {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
Expand All @@ -81,11 +77,10 @@ body.light {
--hl-10: var(--light-hl-10);
--hl-11: var(--light-hl-11);
--hl-12: var(--light-hl-12);
--hl-13: var(--light-hl-13);
--code-background: var(--light-code-background);
}

body.dark {
:root[data-theme='dark'] {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
Expand All @@ -99,7 +94,6 @@ body.dark {
--hl-10: var(--dark-hl-10);
--hl-11: var(--dark-hl-11);
--hl-12: var(--dark-hl-12);
--hl-13: var(--dark-hl-13);
--code-background: var(--dark-code-background);
}

Expand All @@ -116,5 +110,4 @@ body.dark {
.hl-10 { color: var(--hl-10); }
.hl-11 { color: var(--hl-11); }
.hl-12 { color: var(--hl-12); }
.hl-13 { color: var(--hl-13); }
pre, code { background: var(--code-background); }

0 comments on commit 505f1e6

Please sign in to comment.