Skip to content

Commit

Permalink
Making the ES module (#3)
Browse files Browse the repository at this point in the history
* ADD es

* ADD better linting config and gh actions

* FIX gh action

* ADD lower case export
  • Loading branch information
jonathanlurie authored Nov 8, 2023
1 parent b770fdb commit 4cedacb
Show file tree
Hide file tree
Showing 31 changed files with 6,836 additions and 652 deletions.
13 changes: 13 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
}
}
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Objective
What is the goal?

## Description
What changed, how and why?

## Acceptance
How were changes tested?

## Checklist
- [ ] I have added relevant info to the CHANGELOG.md
24 changes: 24 additions & 0 deletions .github/workflows/format-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Format and Lint

on: [pull_request]

jobs:
format-and-lint:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Node.js dependencies
run: npm ci

- name: Formatting with Prettier
run: npm run format

- name: Linting with ESLint
run: npm run lint
1 change: 1 addition & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run make
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
88 changes: 83 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,112 @@
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directory
node_modules
# Dependency directories
node_modules/
jspm_packages/


# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

.DS_Store
# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt


# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
.DS_Store

tmp.txt

tests/
build/
dist/
docs/
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
src/
docs
images
tests
vite*
.github
.eslintrc.json
demos
build
136 changes: 13 additions & 123 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,127 +1,17 @@
# Change Log
All notable changes to this project will be documented in this file.
# MapTiler Client Changelog

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## DEVEL
### New Features
### Bug Fixes
### Others

## 1.0.0 - 2023-05-08
## 2.0.0
### New Features
- Major rework of the library to nmake it fully compatible with ES module installable from NPM, yet designed to be fully backward compatible and still usable from CDN/UMD
- The custom layer exposes the MapTiler SDK layer helpers to make it easy to add polyline/point/polygon/heatmap layers
- The custom layer now has a "ready" event that happens when the internal MapTiler SDK Map instance is fully loaded

### Changed

- This fork is intended to support MapTiler SDK instead of MapLibre GL JS

## Unreleased

- Fix [#29](https://github.com/maplibre/maplibre-gl-leaflet/issues/29) - layer is mis-aligned with map when panning the map off screen ([#31](https://github.com/maplibre/maplibre-gl-leaflet/pulls/31))

## 0.0.19 - 2022-11-30

### Fixed

- round CSS translate values to avoid blurry tiles ([#41](https://github.com/maplibre/maplibre-gl-leaflet/issues/41)).

## 0.0.18 - 2022-11-11

### Fixed

- import MapOptions instead of obsolete MapboxOptions for compatibility with neuer maplibre-gl versions ([#25](https://github.com/maplibre/maplibre-gl-leaflet/issues/25)).

## 0.0.15 - 2021-07-08

### Added
- types definition

## 0.0.14 - 2020-11-24

### Fixed

- fix gl offset issue in low zoom level

## 0.0.13 - 2020-08-31

### Added
- `.getPaneName()` method

### Fixed
- Allow gl tiles to be added to a custom pane defined in options

## 0.0.12 - 2020-03-27

### Fixed

- `accessToken` is now optional

## 0.0.11 - 2019-11-04

### Fixed

- ensure gl map is added to leaflet TilePane

## 0.0.10 - 2019-09-16

## Added

- `.getContainer()`, `.getSize()`, `getBounds()` and `getCanvas()` methods.

## Fixed

- internal code changes to bring it closer to other overlay layers.

## 0.0.9 - 2019-09-02

## Added

- Added `interactive` option to make `mapbox-gl` map events handling possible.
- added public accessor to `mapbox-gl` map object

## 0.0.8 - 2019-08-07

## Added

- Added a `padding` option to fix the grey backgrougd flickering around the edges of the map while panning/zooming
- bumped the libraries in examples

## 0.0.7 - 2019-07-01

### Fixed

- Ensure no blank/gray area is displayed when zooming out.

## 0.0.6 - 2019-05-07

### Fixed

- `.git` directory removed from npm tarball.

## 0.0.5 - 2019-05-01

### Added

- `leaflet` and `mapbox-gl-js` are now declared as peerDependencies.

## 0.0.4 - 2019-02-27

### Added

- UMD wrapper
- support for `pane` in constructor

### Fixed

- webkitTransitionEnd event crash

## 0.0.3 - 2017-04-18

### Added

- Improved support for older versions of `mapbox-gl-js`

## 0.0.2 - 2017-03-08

### Added

- Introduced support for Leaflet `v1.0.x`

## 0.7. - 2016-10-09

- Compatibility release for Leaflet `v0.7.x`
## 1.0.0
### New Features
- First release. This was essentially a fork of the [MapLibre version](https://github.com/maplibre/maplibre-gl-leaflet) adapted to MapTiler SDK.
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MapTiler Weather JS Module

Copyright © 2023 MapTiler AG. All rights reserved.

The software and files (collectively “Software”) in this repository are licensed for use only with MapTiler service(s).

For the license terms, please reference [MapTiler General Terms and Conditions](https://www.maptiler.com/terms/) which incorporate MapTiler Weather JS Module Product [Terms (collectively “Terms”) and Privacy Policy at Privacy policy](https://www.maptiler.com/privacy-policy).

This license allows users with an active MapTiler account to modify and integrate authorized portions of the Software for use with the relevant MapTiler service(s) in accordance with the MapTiler Terms. This license terminates automatically if a user no longer maintains a MapTiler account or their usage breaches MapTiler Terms.
Loading

0 comments on commit 4cedacb

Please sign in to comment.