Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: yarn, vitest, update devDependencies #343

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
bundle.js
dist/
docs/
node_modules/
spec/vendor/openlocationcode.js
spec/vendor/openlocationcode.js
16 changes: 8 additions & 8 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 12.x
- run: npm ci
- run: npm run build
- run: npm test
- run: npm run doc
node-version: 16
- run: yarn install --frozen-lockfile
- run: yarn run build
- run: yarn run test
- run: yarn run doc
- name: Deploy TypeDoc
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ dist/*
!dist/Control.Geocoder.css
docs/
node_modules/
package-lock.json
1 change: 1 addition & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
printWidth: 100
singleQuote: true
trailingComma: none
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## 2.4.0 (2022-02-06)

* export { Geocoder, geocoder, geocoders } ([ec17333](https://github.com/perliedman/leaflet-control-geocoder/commit/ec17333))
- export { Geocoder, geocoder, geocoders } ([ec17333](https://github.com/perliedman/leaflet-control-geocoder/commit/ec17333))

## 2.3.0 (2021-05-25)

* Specify TypeScript declaration file ([1183518](https://github.com/perliedman/leaflet-control-geocoder/commit/1183518))
- Specify TypeScript declaration file ([1183518](https://github.com/perliedman/leaflet-control-geocoder/commit/1183518))

## 2.2.0 (2021-03-08)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ For example:
var geocoder = L.Control.geocoder({
defaultMarkGeocode: false
})
.on('markgeocode', function(e) {
.on('markgeocode', function (e) {
var bbox = e.geocode.bbox;
var poly = L.polygon([
bbox.getSouthEast(),
Expand Down
4 changes: 2 additions & 2 deletions demo-esbuild/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
This demo demonstrates the usage of leaflet-control-geocoder using the [esbuild](https://github.com/evanw/esbuild) bundler.

1. `cd demo-esbuild/`
2. `npm install`
3. `npm run build`
2. `yarn install`
3. `yarn run build`
4. `xdg-open index.html` or open `index.html` in your browser
4 changes: 2 additions & 2 deletions demo-esbuild/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Leaflet Control Geocoder</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./dist/main.css" />
</head>
<body>
<div id="map" style="width: 600px; height: 400px;"></div>
<div id="map" style="width: 600px; height: 400px"></div>
<script src="./dist/main.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions demo-rollup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
This demo demonstrates the usage of leaflet-control-geocoder using the [rollup.js](https://rollupjs.org/) bundler.

1. `cd demo-rollup/`
2. `npm install`
3. `npm run build`
2. `yarn install`
3. `yarn run build`
4. `xdg-open index.html` or open `index.html` in your browser
4 changes: 2 additions & 2 deletions demo-rollup/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Leaflet Control Geocoder</title>
Expand All @@ -10,7 +10,7 @@
/>
</head>
<body>
<div id="map" style="width: 600px; height: 400px;"></div>
<div id="map" style="width: 600px; height: 400px"></div>
<script src="./bundle.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions demo-unpkg/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Leaflet Control Geocoder</title>
Expand All @@ -10,7 +10,7 @@
/>
</head>
<body>
<div id="map" style="width: 600px; height: 400px;"></div>
<div id="map" style="width: 600px; height: 400px"></div>
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
<script>
Expand Down
4 changes: 2 additions & 2 deletions demo-webpack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
This demo demonstrates the usage of leaflet-control-geocoder using the [webpack](https://webpack.js.org/) bundler.

1. `cd demo-webpack/`
2. `npm install`
3. `npm run build`
2. `yarn install`
3. `yarn run build`
4. `xdg-open index.html` or open `index.html` in your browser
4 changes: 2 additions & 2 deletions demo-webpack/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Leaflet Control Geocoder</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./dist/leaflet.css" />
</head>
<body>
<div id="map" style="width: 600px; height: 400px;"></div>
<div id="map" style="width: 600px; height: 400px"></div>
<script src="./dist/leaflet.js"></script>
</body>
</html>
13 changes: 5 additions & 8 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<title>Leaflet Control Geocoder</title>
Expand Down Expand Up @@ -51,16 +51,16 @@
}).addTo(map);
var marker;

setTimeout(function() {
setTimeout(function () {
control.setQuery('Earth');
}, 12000);

L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);

map.on('click', function(e) {
geocoder.reverse(e.latlng, map.options.crs.scale(map.getZoom()), function(results) {
map.on('click', function (e) {
geocoder.reverse(e.latlng, map.options.crs.scale(map.getZoom()), function (results) {
var r = results[0];
if (r) {
if (marker) {
Expand All @@ -69,10 +69,7 @@
.setPopupContent(r.html || r.name)
.openPopup();
} else {
marker = L.marker(r.center)
.bindPopup(r.name)
.addTo(map)
.openPopup();
marker = L.marker(r.center).bindPopup(r.name).addTo(map).openPopup();
}
}
});
Expand Down
3 changes: 0 additions & 3 deletions jest.config.json

This file was deleted.

Loading
Loading