Convert to esm module syntax (#606)

* switch to esm module

* Update package.json

* change to maplibre package

* fix tests

* eslint

* remove extra package updates

* Delete package-lock.json

* change 'fs' to 'node:fs'

* put back node 10.

without the package updates this still works

* remove trailing commas

* remove unassociated fix / formatting

* remove unassociated fix

* remove eslint from this PR

* remove unassociated fix

* lint

* Merge remote-tracking branch 'upstream/master' into esm_update

* fix mlgl

* update maplibre-native to new version with arm64

* update minor version
This commit is contained in:
Andrew Calcutt
2022-09-28 14:41:55 -04:00
committed by GitHub
parent 7cfcc413c4
commit b2bd5eaa96
16 changed files with 412 additions and 401 deletions
+5 -5
View File
@@ -16,8 +16,8 @@ require('child_process').execSync('rsync -av --exclude="light" --exclude=".git"
});
// PATCH `package.json`
var fs = require('fs');
var packageJson = require('./package');
const fs = require('fs');
const packageJson = require('./package');
packageJson.name += '-light';
packageJson.description = 'Map tile server for JSON GL styles - serving vector tiles';
@@ -30,15 +30,15 @@ delete packageJson.devDependencies;
packageJson.engines.node = '>= 10';
var str = JSON.stringify(packageJson, undefined, 2);
const str = JSON.stringify(packageJson, undefined, 2);
fs.writeFileSync('light/package.json', str);
fs.renameSync('light/README_light.md', 'light/README.md');
fs.renameSync('light/Dockerfile_light', 'light/Dockerfile');
fs.renameSync('light/docker-entrypoint_light.sh', 'light/docker-entrypoint.sh');
// for Build tileserver-gl-light docker image, don't publish
if (process.argv.length > 2 && process.argv[2] == "--no-publish") {
process.exit(0)
if (process.argv.length > 2 && process.argv[2] == '--no-publish') {
process.exit(0);
}
/* PUBLISH */