Merge pull request #5789 from tchak/fix-build-js-and-carte

Fix build js and carte
This commit is contained in:
LeSim 2020-12-11 14:57:31 +01:00 committed by GitHub
commit 6dd56eed68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1247 additions and 2405 deletions

View file

@ -118,10 +118,12 @@ const OPTIONAL_LAYERS = [
function buildSources() {
return Object.fromEntries(
OPTIONAL_LAYERS.flatMap(({ layers }) => layers).map(([, code]) => [
code.toLowerCase().replace(/\./g, '-'),
rasterSource([ignServiceURL(code)], 'IGN-F/Géoportail/MNHN')
])
OPTIONAL_LAYERS.filter(({ id }) => id !== 'cadastres')
.flatMap(({ layers }) => layers)
.map(([, code]) => [
code.toLowerCase().replace(/\./g, '-'),
rasterSource([ignServiceURL(code)], 'IGN-F/Géoportail/MNHN')
])
);
}
@ -139,10 +141,10 @@ function rasterSource(tiles, attribution) {
export function buildLayers(ids) {
return OPTIONAL_LAYERS.filter(({ id }) => ids.includes(id))
.flatMap(({ layers }) => layers)
.map(([, code]) =>
.flatMap(([, code]) =>
code === 'CADASTRE'
? cadastreLayers
: rasterLayer(code.toLowerCase().replace(/\./g, '-'))
: [rasterLayer(code.toLowerCase().replace(/\./g, '-'))]
);
}

View file

@ -1,21 +1,21 @@
{
"dependencies": {
"@babel/preset-react": "^7.12.10",
"@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/react-fontawesome": "^0.1.13",
"@babel/preset-react": "^7.10.4",
"@fortawesome/fontawesome-svg-core": "^1.2.28",
"@fortawesome/free-solid-svg-icons": "^5.13.0",
"@fortawesome/react-fontawesome": "^0.1.9",
"@mapbox/mapbox-gl-draw": "^1.2.0",
"@rails/actiontext": "^6.1.0",
"@rails/activestorage": "^6.1.0",
"@rails/ujs": "^6.1.0",
"@rails/webpacker": "5.2.1",
"@rails/actiontext": "^6.0.3",
"@rails/activestorage": "^6.0.3",
"@rails/ujs": "^6.0.3",
"@rails/webpacker": "5.1.1",
"@reach/combobox": "^0.10.2",
"@sentry/browser": "^5.29.0",
"@sentry/browser": "^5.15.5",
"@tmcw/togeojson": "^4.0.0",
"babel-plugin-macros": "^2.8.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"chartkick": "^3.2.0",
"core-js": "^3.8.1",
"core-js": "^3.6.5",
"debounce": "^1.2.0",
"dom4": "^2.1.5",
"email-butler": "^1.0.13",
@ -30,26 +30,26 @@
"react-intersection-observer": "^8.26.2",
"react-mapbox-gl": "^4.8.6",
"react-mapbox-gl-draw": "^2.0.4",
"react-query": "^2.26.4",
"react-query": "^2.23.1",
"react-scroll-to-component": "^1.0.2",
"react-sortable-hoc": "^1.11.0",
"react-use": "^15.3.4",
"react_ujs": "^2.6.1",
"select2": "^4.0.13",
"trix": "^1.2.3",
"whatwg-fetch": "^3.5.0"
"whatwg-fetch": "^3.0.0"
},
"devDependencies": {
"@2fd/graphdoc": "^2.4.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.15.0",
"eslint-config-prettier": "^7.0.0",
"eslint-plugin-prettier": "^3.2.0",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"netlify-cli": "^2.69.4",
"prettier": "^2.2.1",
"webpack-bundle-analyzer": "^4.2.0",
"eslint": "^7.0.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.2",
"netlify-cli": "^2.61.2",
"prettier": "^2.0.5",
"webpack-bundle-analyzer": "^3.7.0",
"webpack-dev-server": "^3.11.0"
},
"scripts": {

3598
yarn.lock

File diff suppressed because it is too large Load diff