diff --git a/.prettierignore b/.prettierignore index 041daf3..8228df2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -12,3 +12,6 @@ layers/ locales/*.json resources/boundaries/ resources/standalone/*.sh +profiles2/ +tests/**/*.json +tests/**/*.gpx diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 85d7892..8475cb4 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,8 @@ { - "recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "ms-azuretools.vscode-docker"] + "recommendations": [ + "esbenp.prettier-vscode", + "dbaeumer.vscode-eslint", + "ms-azuretools.vscode-docker", + "msjsdiag.debugger-for-chrome" + ] } diff --git a/.vscode/launch.json b/.vscode/launch.json index d77651d..4077f51 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,11 +5,33 @@ "version": "0.2.0", "configurations": [ { + "name": "Launch Chrome against localhost", "type": "chrome", "request": "launch", - "name": "Launch Chrome against localhost", "url": "http://localhost:3000", "webRoot": "${workspaceFolder}" + }, + { + "name": "Debug Chromium (Snap) localhost", + "type": "chrome", + "request": "launch", + "url": "http://localhost:3000", + "webRoot": "${workspaceFolder}", + "runtimeExecutable": "/snap/bin/chromium", + "runtimeArgs": ["--new-window", "--remote-debugging-port=9222", "--disable-background-networking"], + "sourceMaps": true, + "sourceMapPathOverrides": { + "*": "${webRoot}/*" + } + }, + { + "name": "Debug Jest tests", + "type": "node", + "request": "launch", + "runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/.bin/jest", "--runInBand"], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "port": 9229 } ] } diff --git a/README.md b/README.md index 49a1011..a04fd0c 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,10 @@ Copyright (c) 2018 Norbert Renner and [contributors](https://github.com/nrenner/ Copyright (c) 2014-2021 Denis Pushkarev; [MIT License](https://github.com/zloirock/core-js/blob/master/LICENSE) - [regenerator-runtime](https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime) Copyright (c) 2014-present, Facebook, Inc.; [MIT License](https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/LICENSE) +- [tokml](https://github.com/mapbox/tokml) + Copyright (c) 2015, Mapbox All rights reserved; [BSD-2-Clause License](https://github.com/mapbox/tokml/blob/master/LICENSE.md) +- [Jest](https://github.com/facebook/jest) + Copyright (c) Facebook, Inc. and its affiliates; [MIT License](https://github.com/facebook/jest/blob/master/LICENSE) - [overpass-layer](https://github.com/plepe/overpass-layer) Copyright (c) 2020 Stephan Bösch-Plepelits; [MIT License](https://github.com/plepe/overpass-layer/blob/master/LICENSE) - [maki](https://github.com/mapbox/maki) diff --git a/gulpfile.js b/gulpfile.js index 8d2e366..5c56204 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -71,6 +71,7 @@ var paths = { 'js/LayersConfig.js', 'js/router/BRouter.js', 'js/util/*.js', + 'js/format/*.js', 'js/plugin/*.js', 'js/control/*.js', 'js/index.js', @@ -285,14 +286,11 @@ gulp.task('bump:json', function () { }); gulp.task('bump:html', function () { + const version = nextVersion || pkg.version; return gulp .src('./index.html') - .pipe( - replace( - /(.*)<\/sup>/, - '' + (nextVersion || pkg.version) + '' - ) - ) + .pipe(replace(/(.*)<\/sup>/, '' + version + '')) + .pipe(replace(/BR.version = '(.*?)';/, "BR.version = '" + version + "';")) .pipe(gulp.dest('.')); }); diff --git a/index.html b/index.html index 88dc7e3..5185d5a 100644 --- a/index.html +++ b/index.html @@ -1227,6 +1227,7 @@