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

[pull] master from allartk:master #1

Open
wants to merge 182 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
6b9ab5b
npm update (#127)
allartk Jan 9, 2022
7f6ca99
updates20220126
allartk Jan 26, 2022
0e0db31
WIP install ts
allartk Jan 26, 2022
816f503
repair build
allartk Jan 30, 2022
fad60d1
Update tasks
allartk Jan 30, 2022
6bcbff6
WIP add types
allartk Feb 2, 2022
2ccf89c
WIP solve more type errors
allartk Feb 12, 2022
d2d59db
WIP more types, do not access private props
allartk Feb 16, 2022
d267ee4
WIP cleanup tilelayeroffline
allartk Feb 20, 2022
2471909
WIP (what a mess)
allartk Feb 20, 2022
d220a7a
WIP type the control
allartk Mar 2, 2022
4bdf8e9
fix last ts errors
allartk Mar 6, 2022
29e6f6f
fix test imports
allartk Mar 6, 2022
ef7c5cd
fix examples
allartk Mar 6, 2022
580e0ff
Add typescript eslint package
allartk Mar 6, 2022
c2f7c7d
fix some linter issues
allartk Mar 6, 2022
19aeaae
Use ts for tests
allartk Mar 16, 2022
45792c1
update eslint
allartk Mar 16, 2022
bd326f8
fix eslint
allartk Mar 16, 2022
52301dc
more type fixes
allartk Mar 19, 2022
588581c
More types again
allartk Mar 20, 2022
14f29c8
Avoid downloading images if already in the database (#159)
harry-73 Mar 21, 2022
6f1734a
Add global sinon
allartk Mar 26, 2022
5aa4dca
Split definition arg, and inner option object
allartk Mar 26, 2022
6f108fc
Build!
allartk Mar 26, 2022
66e4e29
link to master branch
allartk Mar 26, 2022
779fbd0
Export open database method, init only when used
allartk Mar 26, 2022
351298f
run actions on push to main branches too
allartk Mar 26, 2022
ecbebae
Update examples
allartk Mar 26, 2022
96978b2
generate doc with typedoc
allartk Mar 26, 2022
6bca2c7
don't use the database during download (#161)
harry-73 Mar 29, 2022
c5d108b
2.2.0
allartk Mar 30, 2022
6c980de
Use partial utility for options
allartk Mar 30, 2022
82f96d8
audit fix
allartk Mar 30, 2022
d3a61af
Bump @babel/core from 7.16.12 to 7.17.8 (#168)
dependabot[bot] Mar 30, 2022
21f9eae
Bump eslint from 8.11.0 to 8.12.0 (#166)
dependabot[bot] Mar 30, 2022
c3fd274
Bump minimist from 1.2.5 to 1.2.6 in /docs (#163)
dependabot[bot] Mar 30, 2022
ec419f7
Bump lint-staged from 12.3.2 to 12.3.7 (#160)
dependabot[bot] Mar 30, 2022
45249ab
Bump prettier from 2.5.1 to 2.6.1 (#171)
dependabot[bot] Mar 31, 2022
e98d841
Bump typescript from 4.5.5 to 4.6.3 (#170)
dependabot[bot] Apr 1, 2022
25bee18
Bump rollup from 2.66.1 to 2.70.1 (#169)
dependabot[bot] Apr 1, 2022
df01ce7
Bump karma-rollup-preprocessor from 7.0.7 to 7.0.8 (#172)
dependabot[bot] Apr 1, 2022
f07e32a
Bump eslint-config-airbnb-typescript from 16.1.0 to 16.2.0 (#176)
dependabot[bot] Apr 4, 2022
f701de5
Bump @typescript-eslint/eslint-plugin from 5.13.0 to 5.17.0 (#175)
dependabot[bot] Apr 4, 2022
dc20a05
Bump @typescript-eslint/parser from 5.13.0 to 5.17.0 (#173)
dependabot[bot] Apr 4, 2022
66ae280
Bump @rollup/plugin-babel from 5.3.0 to 5.3.1 (#178)
dependabot[bot] Apr 10, 2022
e5c1bfe
Bump eslint-config-prettier from 8.3.0 to 8.5.0 (#179)
dependabot[bot] Apr 10, 2022
1eca35a
Bump typedoc-plugin-markdown from 3.11.14 to 3.12.0 (#180)
dependabot[bot] Apr 11, 2022
26fba11
Bump eslint from 8.12.0 to 8.13.0 (#181)
dependabot[bot] Apr 12, 2022
6b62d08
Bump mocha from 9.2.0 to 9.2.2 (#177)
dependabot[bot] Apr 12, 2022
c903abb
Bump sinon from 12.0.1 to 13.0.2 (#186)
dependabot[bot] Apr 15, 2022
542778b
Bump typedoc from 0.22.13 to 0.22.15 (#188)
dependabot[bot] Apr 15, 2022
82c10de
decrease number of dependabot prs
May 14, 2022
c712e80
Bump async from 2.6.3 to 2.6.4 in /docs (#187)
dependabot[bot] May 14, 2022
f9c93b4
set required node engine
May 14, 2022
8c5b1a1
we use already version to 16
May 14, 2022
17e2dc0
update webpack dev
May 14, 2022
3f218b3
Bump prettier from 2.6.1 to 2.6.2 (#190)
dependabot[bot] May 16, 2022
fea61ea
Bump @typescript-eslint/parser from 5.17.0 to 5.27.0 (#204)
dependabot[bot] Jun 29, 2022
8de958e
Reimplement #159 in ts (#210)
allartk Jun 29, 2022
6846961
Less nesting
allartk Jun 29, 2022
3a9070c
3.0.0-rc.1
Jun 29, 2022
8a5cd2b
closes #193
allartk Jun 29, 2022
677b26f
Leave note how to npm install version 3
allartk Jun 29, 2022
46e4a55
Bump terser from 5.12.1 to 5.14.2 in /docs (#212)
dependabot[bot] Jul 21, 2022
4123f07
add global factory method
allartk Sep 16, 2022
155b55f
Bump @rollup/plugin-node-resolve from 13.1.3 to 14.1.0 (#221)
dependabot[bot] Oct 12, 2022
1564e39
Bump karma from 6.3.17 to 6.4.1 (#220)
dependabot[bot] Oct 12, 2022
f033eb5
Bump @typescript-eslint/eslint-plugin from 5.17.0 to 5.38.1 (#219)
dependabot[bot] Oct 12, 2022
814e29b
Bump prettier from 2.6.2 to 2.7.1 (#222)
dependabot[bot] Oct 13, 2022
45bc4bf
Types not found, partial fix for #216
allartk Oct 26, 2022
2052cf6
Bump @babel/core from 7.17.8 to 7.19.6 (#230)
dependabot[bot] Oct 26, 2022
d978054
Bump typedoc from 0.22.15 to 0.23.18 (#231)
dependabot[bot] Oct 26, 2022
f0acb98
Bump @babel/preset-typescript from 7.16.7 to 7.18.6 (#233)
dependabot[bot] Nov 2, 2022
5f5c0f6
Bump typedoc from 0.23.18 to 0.23.19 (#234)
dependabot[bot] Nov 2, 2022
643225c
Bump engine.io and socket.io (#236)
dependabot[bot] Nov 22, 2022
213ff7d
Support node 18 (#237)
sallesma Nov 30, 2022
f2524fb
Bump minimatch from 3.0.4 to 3.1.2 (#238)
dependabot[bot] Nov 30, 2022
423d3d2
Fix run tests on ubuntu 22
allartk Nov 30, 2022
b365254
3.0.0-rc.3
allartk Nov 30, 2022
1c8eee1
use leaflet as module in tests
allartk Nov 30, 2022
d846c18
Add globals and check global L exists
allartk Nov 30, 2022
3d57af5
fix index.js:362 Uncaught TypeError: L.control.savetiles is not a fun…
allartk Nov 30, 2022
02e117f
remove generated files
allartk Nov 30, 2022
c681d1c
Add nomodules page to nav
allartk Nov 30, 2022
3c915fd
update docs
allartk Nov 30, 2022
7ead969
Feature/use leaflet as module in test (#239)
allartk Nov 30, 2022
c4a5c93
3.0.0-rc.4
allartk Nov 30, 2022
f63c147
Merge branch 'feature/use-leaflet-as-module-in-test' into develop
allartk Nov 30, 2022
3bd58ca
Bump @babel/core from 7.19.6 to 7.20.5 (#244)
dependabot[bot] Dec 1, 2022
75fe79c
Bump qs and body-parser (#246)
dependabot[bot] Dec 7, 2022
1d4bcf0
Bump idb from 6.1.5 to 7.1.1 (#241)
dependabot[bot] Jan 2, 2023
eb1c5d9
Bump eslint from 8.13.0 to 8.31.0 (#249)
dependabot[bot] Jan 2, 2023
514e5e5
Bump json5 from 1.0.1 to 1.0.2 (#250)
dependabot[bot] Jan 11, 2023
d14a4e7
Merge branch 'develop'
allartk Jan 11, 2023
b2b72fb
Target develop for dependecy updates
allartk Jan 11, 2023
efda6c1
3.0.0
allartk Jan 11, 2023
1c04184
Exclude tmp folder for firefox in package
allartk Jan 11, 2023
33aaad9
Final release 3.0 is not tagged
allartk Jan 11, 2023
7f6c83c
Refs [Feature Request] Support removing expired tiles? #228
allartk Jan 11, 2023
59dd3d6
Master is now 3.x
allartk Jan 11, 2023
7ad96c7
Include js docs website
allartk Jan 11, 2023
f13bd17
Bump typedoc-plugin-markdown from 3.13.6 to 3.14.0 (#252)
dependabot[bot] Jan 12, 2023
fd78f90
forEach won't wait
allartk Jan 22, 2023
e2d6c9a
Bump ua-parser-js from 0.7.31 to 0.7.33 (#256)
dependabot[bot] Jan 27, 2023
93cb780
Bump lint-staged from 12.3.7 to 13.1.0 (#248)
dependabot[bot] Mar 1, 2023
69a1b8c
Bump webpack from 5.70.0 to 5.76.0 in /docs (#267)
dependabot[bot] Mar 15, 2023
710f077
Bump dns-packet from 5.3.1 to 5.4.0 in /docs (#266)
dependabot[bot] Mar 20, 2023
bcf6ebd
Develop (#276)
allartk Apr 19, 2023
5273065
Bump typedoc from 0.24.1 to 0.24.4 (#281)
dependabot[bot] Apr 20, 2023
caf58f8
Bump rollup from 3.20.2 to 3.20.6 (#280)
dependabot[bot] Apr 20, 2023
aa0bea5
Bump typedoc-plugin-markdown from 3.14.0 to 3.15.1 (#278)
dependabot[bot] Apr 21, 2023
b4d7230
Bump yaml from 2.2.1 to 2.2.2 (#282)
dependabot[bot] Apr 26, 2023
38f355f
Bump typedoc-plugin-markdown from 3.15.1 to 3.15.3 (#284)
dependabot[bot] May 3, 2023
dac2cfb
Bump @babel/preset-typescript from 7.21.4 to 7.21.5 (#285)
dependabot[bot] May 3, 2023
0233ca6
Bump engine.io from 6.4.1 to 6.4.2 (#289)
dependabot[bot] May 11, 2023
61c74e7
Bump @typescript-eslint/parser from 5.57.1 to 5.59.1 (#288)
dependabot[bot] May 15, 2023
ed20e7e
Bump @typescript-eslint/eslint-plugin from 5.57.1 to 5.59.1 (#287)
dependabot[bot] May 15, 2023
999f518
Bump @rollup/plugin-commonjs from 24.0.1 to 24.1.0 (#286)
dependabot[bot] May 15, 2023
e52e5c0
Bump socket.io-parser from 4.2.2 to 4.2.3 (#290)
dependabot[bot] May 29, 2023
913ba3c
Bump typedoc from 0.24.4 to 0.24.7 (#291)
dependabot[bot] Jun 1, 2023
b3b8195
Bump @typescript-eslint/parser from 5.59.1 to 5.59.8 (#292)
dependabot[bot] Jun 1, 2023
e516fed
Bump rollup from 3.20.6 to 3.23.0 (#293)
dependabot[bot] Jun 1, 2023
6e99427
Bump eslint from 8.38.0 to 8.41.0 (#294)
dependabot[bot] Jun 1, 2023
97369c0
Bump @typescript-eslint/eslint-plugin from 5.59.1 to 5.59.8 (#295)
dependabot[bot] Jun 4, 2023
c58ef29
Bump @rollup/plugin-commonjs from 24.1.0 to 25.0.2 (#300)
dependabot[bot] Jul 7, 2023
ff5d53a
Bump lint-staged from 13.2.1 to 13.2.3 (#299)
dependabot[bot] Jul 7, 2023
2f58c6f
Bump word-wrap from 1.2.3 to 1.2.4 (#302)
dependabot[bot] Jul 26, 2023
8de63fc
Bump eslint from 8.41.0 to 8.46.0 (#306)
dependabot[bot] Aug 2, 2023
2b19907
Bump typedoc from 0.24.7 to 0.24.8 (#305)
dependabot[bot] Aug 2, 2023
97d3b20
Bump eslint-config-prettier from 8.8.0 to 8.9.0 (#304)
dependabot[bot] Aug 16, 2023
cdcc665
Bump karma from 6.4.1 to 6.4.2 (#298)
dependabot[bot] Aug 16, 2023
5d81853
Update README.md
allartk Aug 16, 2023
0d72a07
Update README.md
allartk Aug 16, 2023
654ff04
Bump leaflet from 1.9.3 to 1.9.4 (#297)
dependabot[bot] Aug 16, 2023
12490cf
Bump typedoc-plugin-markdown from 3.15.3 to 3.16.0 (#311)
dependabot[bot] Sep 3, 2023
4c87915
Bump eslint-config-airbnb-typescript from 17.0.0 to 17.1.0 (#309)
dependabot[bot] Sep 3, 2023
fd08a7b
Bump chai from 4.3.7 to 4.3.8 (#310)
dependabot[bot] Sep 3, 2023
6bb2283
Update const.js to use correct tile.osm.org URL (#313)
Firefishy Sep 3, 2023
e20955f
Bump prettier from 2.8.7 to 3.0.3 (#312)
dependabot[bot] Sep 3, 2023
f9abb37
3.0.1
allartk Sep 3, 2023
daddb0a
Add working coverage reporting (and change build system to support th…
allartk Oct 23, 2023
1cb7713
Bump typedoc from 0.24.8 to 0.25.2 (#325)
dependabot[bot] Oct 23, 2023
2ae161d
Bump @rollup/plugin-commonjs from 25.0.2 to 25.0.7 (#324)
dependabot[bot] Oct 23, 2023
c791b89
Bump sinon from 13.0.2 to 17.0.0 (#323)
dependabot[bot] Oct 24, 2023
45c8fa6
Bump eslint-config-prettier from 8.9.0 to 9.0.0 (#315)
dependabot[bot] Oct 25, 2023
859998f
add a test for the geojson overlay (#327)
allartk Oct 25, 2023
b6abce8
restore type declarations (#326)
allartk Oct 25, 2023
5f4f8e4
Test the download method (#333)
allartk Nov 1, 2023
115374e
Bump lint-staged from 13.2.3 to 15.0.2 (#331)
dependabot[bot] Nov 1, 2023
53fa152
Feature/addimageurlcreator (#334)
allartk Nov 22, 2023
647dc84
fix exports from module to fix demo
allartk Nov 25, 2023
2790972
Bump typedoc from 0.25.2 to 0.25.4 (#336)
dependabot[bot] Dec 2, 2023
aca4058
Bump prettier from 3.0.3 to 3.1.1 (#340)
dependabot[bot] Jan 1, 2024
0d05d58
Bump @types/leaflet from 1.9.3 to 1.9.8 (#337)
dependabot[bot] Jan 1, 2024
a2e96f8
Bump @types/karma-chai from 0.1.3 to 0.1.6 (#335)
dependabot[bot] Jan 1, 2024
e00e2f9
Bump rollup-plugin-istanbul from 4.0.0 to 5.0.0 (#328)
dependabot[bot] Jan 1, 2024
c136030
Bump @typescript-eslint/parser from 5.59.8 to 5.62.0 (#346)
dependabot[bot] Mar 17, 2024
0759890
Bump typedoc-plugin-markdown from 3.16.0 to 3.17.1 (#347)
dependabot[bot] Mar 17, 2024
7183d8e
Bump typedoc from 0.25.4 to 0.25.12 (#361)
dependabot[bot] Apr 9, 2024
2457be5
Bump webpack-dev-middleware from 5.3.1 to 5.3.4 in /docs (#357)
dependabot[bot] May 25, 2024
ef8fabd
Bump @rollup/plugin-node-resolve from 15.0.2 to 15.2.3 (#349)
dependabot[bot] May 25, 2024
e811b34
do not expose to network
allartk Jul 10, 2024
443323c
Merge branch 'master' of github.com:allartk/leaflet.offline
allartk Jul 10, 2024
8b60e85
Add codecov action (#371)
allartk Jul 10, 2024
a270895
Bump @typescript-eslint/eslint-plugin from 5.59.8 to 5.62.0 (#353)
dependabot[bot] Jul 10, 2024
5dcce7e
Bump express from 4.17.3 to 4.19.2 in /docs (#359)
dependabot[bot] Jul 10, 2024
41b9086
Bump follow-redirects from 1.15.2 to 1.15.6 (#355)
dependabot[bot] Jul 10, 2024
6735ff8
Bump sinon from 17.0.0 to 18.0.0 (#364)
dependabot[bot] Jul 10, 2024
50e5197
Bump braces from 3.0.2 to 3.0.3 (#367)
dependabot[bot] Jul 10, 2024
efb27a9
Feature/semver (#375)
allartk Jul 12, 2024
d801f71
chore(deps-dev): bump @types/sinon from 10.0.13 to 17.0.3 (#377)
dependabot[bot] Jul 13, 2024
d2b72b8
ci: trigger release manually (#378)
allartk Jul 17, 2024
1856479
Bump @types/karma-chai-sinon from 0.1.16 to 0.1.20
dependabot[bot] Jul 17, 2024
aa3e45f
chore(deps-dev): bump mocha and @types/mocha
dependabot[bot] Jul 17, 2024
98b1b14
Bump typedoc from 0.25.12 to 0.26.4 (#374)
dependabot[bot] Jul 17, 2024
9a03c37
Fix spelling (#381)
petersmythe Jul 21, 2024
5d3a0af
feat: added additional export from tilemanager to index (#382)
George-Madeley Aug 1, 2024
13c558b
chore(deps-dev): bump prettier from 3.1.1 to 3.3.3 (#386)
dependabot[bot] Aug 1, 2024
417a485
chore(deps-dev): bump karma-firefox-launcher from 2.1.2 to 2.1.3 (#385)
dependabot[bot] Aug 1, 2024
ff8869a
chore(deps-dev): bump karma from 6.4.2 to 6.4.4 (#383)
dependabot[bot] Aug 1, 2024
18242ec
chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /docs (#388)
dependabot[bot] Aug 2, 2024
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
5 changes: 0 additions & 5 deletions .babelrc.json

This file was deleted.

3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
36 changes: 25 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
module.exports = {
"ignorePatterns": ["/dist"],
"env": {
"browser": true
ignorePatterns: ['/dist'],
env: {
browser: true,
},
extends: ['airbnb-base', 'prettier'],
parserOptions: {
project: './tsconfig.json',
},
overrides: [
{
files: ['src/**/*.ts', 'test/**/*.ts'],
extends: ['airbnb-base', 'airbnb-typescript/base', 'prettier'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
optionalDependencies: false,
peerDependencies: false,
},
],
'no-underscore-dangle': 0,
'no-return-assign': ['error', 'except-parens'],
},
},
"extends": [
"airbnb-base",
"prettier"
],
"rules": {
"import/no-extraneous-dependencies": ["error", {"devDependencies": true, "optionalDependencies": false, "peerDependencies": false}],
"no-underscore-dangle": 0
}
],
};
16 changes: 12 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "daily"
versioning-strategy: increase-if-necessary
interval: 'monthly'
target-branch: 'master'
versioning-strategy: increase-if-necessary
allow:
# Allow both direct and indirect updates for all packages
- dependency-type: "direct"
commit-message:
prefix: fix
prefix-development: chore
include: scope
14 changes: 12 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: CI
on: [pull_request]
on:
pull_request: ~
push:
branches:
- develop
- master
jobs:
run:
runs-on: ubuntu-latest
Expand All @@ -10,7 +15,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 18
check-latest: true

- name: Cache dependencies
Expand All @@ -32,3 +37,8 @@ jobs:

- name: test
run: npm run test

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on: workflow_dispatch
permissions:
contents: read # for checkout

jobs:
release:
name: Release
runs-on: ubuntu-latest

permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 20

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build

- name: Pack
run: npm pack


- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ node_modules
npm-debug.log
.eslintcache
/.vscode
/tmp/**
!/tmp/.gitkeep
coverage
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ npm-debug.log
docs
.vscode
.eslintcache
tmp
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/hydrogen
14 changes: 14 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"assets": ["leaflet.offline*.tgz"]
}
],
"@semantic-release/npm"
]
}
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# leaflet.offline version 2.x
# leaflet.offline

[![npm version](https://badge.fury.io/js/leaflet.offline.svg)](https://badge.fury.io/js/leaflet.offline)
[![codecov](https://codecov.io/github/allartk/leaflet.offline/graph/badge.svg?token=dy1uNlSvsh)](https://codecov.io/github/allartk/leaflet.offline)
[![Build Status](https://travis-ci.org/allartk/leaflet.offline.png?branch=master)](https://travis-ci.org/allartk/leaflet.offline)

This library can be used to create maps, which are still available when you are offline and are fast when your connection is not. It works in the browser or can be used in an mobile app based on html and in progressive webapps.
Expand Down Expand Up @@ -42,16 +43,15 @@ For running the example locally, you'll need to clone the project and run:
```
npm i && npm run build
cd docs
npm install && npm run serve
npm install && npm run start
```

You can test your code with `npm test`. Please configure eslint in your editor if you wish to contribute.

**pull requests welcome**

Please one feature at a time, if you can split your PR, please do so.

Also, do not mix a feature with package updates.
* You MUST test your code with `npm test` and `npm run lint`.
* Please one feature at a time, if you can split your PR, please do so.
* Also, do not mix a feature with package updates.
* [Use commit message conventions](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#rules)

## Api

Expand Down
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Version 3

- Removal of setOption method on the control
- getTile is now getBlobByKey
- openTilesDataBase is now an export function to get whole idb database
- New control option alwaysDownload, if false, the control will not redownload tiles already in the db (and the savetile\* event do not fire)

# Version 4

- Changed arguments of getStoredTilesAsJson: send an object with tilesize instead of the full layer
7 changes: 7 additions & 0 deletions docs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
module.exports = {
root: true,
ignorePatterns: ['/dist'],
env: {
browser: true,
},
extends: ['airbnb-base', 'prettier'],
rules: {
'no-console': ['error', { allow: ['debug'] }],
'no-underscore-dangle': 0,
},
};
4 changes: 3 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
_site
.jekyll-cache
.jekyll-cache
dist/*.hot-update.js
dist/*.hot-update.json
5 changes: 4 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Examples website

Requires docker to run jekyll

```bash
npm i
npm start
```

http://localhost:4000
http://localhost:4000
18 changes: 18 additions & 0 deletions docs/_includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<title>Leaflet.offline | Examples</title>
<meta charset="UTF-8" />
<link rel="stylesheet" href="{{ site.assets_base_url }}assets/styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/v4-shims.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous" />
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
8 changes: 6 additions & 2 deletions docs/_includes/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@
<li class="nav-item {% if page.url == '/list.html' %}active{% endif %}">
<a class="nav-link" href="list.html">Storage</a>
</li>
<li class="nav-item {% if page.url == '/iife.html' %}active{% endif %}">
<a class="nav-link" href="iife.html">NoModules</a>
</li>
<li class="nav-item">
<a class="nav-link"
href="https://github.com/allartk/leaflet.offline/blob/master/docs/api.md" target="_blank">Api Docs</a>
href="https://github.com/allartk/leaflet.offline/blob/master/docs/typedoc/modules.md"
target="_blank">Api Docs</a>
</li>
</ul>
<a href="https://twitter.com/allartk" class="mx-1">
Expand All @@ -30,7 +34,7 @@
<a href="https://github.com/allartk/leaflet.offline" class="mx-1">
<i class="fab fa-github text-light"></i>
</a>

</div>
</div>
</nav>
26 changes: 4 additions & 22 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,7 @@
<html>

<head>
<title>Leaflet.offline | Examples</title>
<meta charset="UTF-8" />
<link rel="stylesheet" href="{{ site.assets_base_url }}assets/styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://unpkg.com/[email protected]/build/iife/index-min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/v4-shims.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous" />
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
{% include head.html %}
</head>

<body>
Expand All @@ -31,7 +12,8 @@
<div class="col-md-12">
<h1>{{ page.title }}</h1>
<p>
<a href="https://github.com/allartk/leaflet.offline/blob/master/docs/src/{{ page.script }}" class="btn btn-outline-info" target="_blank">
<a href="https://github.com/allartk/leaflet.offline/blob/master/docs/src/{{ page.script }}"
class="btn btn-outline-info" target="_blank">
<i class="fas fa-code"></i>
View source
</a>
Expand All @@ -43,4 +25,4 @@ <h1>{{ page.title }}</h1>
<script src="{{ site.assets_base_url }}dist/{{ page.script }}"></script>
</body>

</html>
</html>
34 changes: 34 additions & 0 deletions docs/_layouts/iife.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>

<head>
{% include head.html %}
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI=" crossorigin="" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM=" crossorigin=""></script>
<script src="dist/leaflet.offline.bundle.js"></script>

</head>

<body>
{% include navbar.html %}
<div class="container-fluid py-md-3" style="max-width:1200px">
<div class="row">
<div class="col-md-12">
<h1>{{ page.title }}</h1>
<p>
<a href="https://github.com/allartk/leaflet.offline/blob/master/docs/{{ page.script }}"
class="btn btn-outline-info" target="_blank">
<i class="fas fa-code"></i>
View source
</a>
</p>
{{ content }}
</div>
</div>
</div>
<script src="{{ site.assets_base_url }}{{ page.script }}"></script>
</body>

</html>
Loading