Skip to content

Commit 357e8c8

Browse files
committed
updates README for release 2.1
1 parent cc8ac96 commit 357e8c8

File tree

4 files changed

+34
-14
lines changed

4 files changed

+34
-14
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
steps:
4646
- uses: actions/checkout@v5
4747

48-
- name: Use Node.js 20.x
48+
- name: Use Node.js 22.x
4949
uses: actions/setup-node@v5
5050
with:
5151
node-version: 22.x
@@ -54,8 +54,8 @@ jobs:
5454
- name: Install dependencies
5555
run: npm ci
5656

57-
- name: Build production
58-
run: npm run build:prod
57+
- name: Build
58+
run: npm run build
5959

6060
- name: Upload build artifacts
6161
uses: actions/upload-artifact@v4

README.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,37 @@ Note: if you want location autosuggest then what you want is [OpenCage's geosear
88

99
## Installation
1010

11-
You have three options
11+
Starting with version 2.1, Bower is no longer supported. The package is now published on npm in both UMD and ESM formats.
1212

13-
- Clone from GitHub: `[email protected]:opencagedata/leaflet-opencage-geocoding.git`
13+
### Via npm
14+
15+
```bash
16+
npm install leaflet-opencage-geocoding
17+
```
1418

15-
or
19+
The package includes both UMD and ESM builds, which you can import based on your project setup:
1620

17-
- Download a [zip or tarball archive](https://github.com/opencagedata/leaflet-opencage-geocoding/tags)
21+
```javascript
22+
// ESM
23+
import 'leaflet-opencage-geocoding';
24+
25+
// CommonJS
26+
require('leaflet-opencage-geocoding');
27+
```
1828

19-
or
29+
### Via CDN (for vanilla JS/HTML projects)
2030

21-
- Install (using the old plugin's name) with Bower : `$ bower install Leaflet.OpenCage.Search`
31+
For classic HTML projects, you can use the CDN:
32+
33+
```html
34+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/opencagedata/[email protected]/dist/css/L.Control.OpenCageGeocoding.min.css" />
35+
<script src="https://cdn.jsdelivr.net/gh/opencagedata/[email protected]/dist/js/L.Control.OpenCageGeocoding.min.js"></script>
36+
```
37+
38+
### Other options
39+
40+
- Clone from GitHub: `[email protected]:opencagedata/leaflet-opencage-geocoding.git`
41+
- Download a [zip or tarball archive](https://github.com/opencagedata/leaflet-opencage-geocoding/tags)
2242

2343
## Configuration
2444

@@ -36,8 +56,8 @@ two image files to a directory relative to the location of the control's CSS fil
3656
Load the plugin's CSS and JavaScript files:
3757

3858
```HTML
39-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/opencagedata/leaflet-opencage-geocoding@v2.0.0/dist/css/L.Control.OpenCageGeocoding.min.css" />
40-
<script src="https://cdn.jsdelivr.net/gh/opencagedata/leaflet-opencage-geocoding@v2.0.0/dist/js/L.Control.OpenCageGeocoding.min.js"></script>
59+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/opencagedata/leaflet-opencage-geocoding@v2.1.0/dist/css/L.Control.OpenCageGeocoding.min.css" />
60+
<script src="https://cdn.jsdelivr.net/gh/opencagedata/leaflet-opencage-geocoding@v2.1.0/dist/js/L.Control.OpenCageGeocoding.min.js"></script>
4161
```
4262

4363
Add the plugin's control to an `L.Map` instance:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opencage/leaflet-opencage-geocoding",
3-
"version": "2.1.0-alpha.1",
3+
"version": "2.1.0",
44
"type": "module",
55
"description": "Leaflet plugin for geocoding via the OpenCage Geocoder API",
66
"repository": {

0 commit comments

Comments
 (0)