mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Update npm packages (#290)
* Updated dependencies * Removed watch mode because of esbuild update * Set spectorjs to fixed version because of https://github.com/BabylonJS/Spector.js/issues/286
This commit is contained in:
parent
1222790c76
commit
9d075527c6
4103
web/demo/package-lock.json
generated
4103
web/demo/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -20,17 +20,17 @@
|
||||
"maplibre-rs": "file:../lib"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.11.9",
|
||||
"@types/webpack": "^5.28.0",
|
||||
"@types/node": "^18.18.3",
|
||||
"@types/webpack": "^5.28.3",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"ts-loader": "^9.4.1",
|
||||
"html-webpack-plugin": "^5.5.3",
|
||||
"ts-loader": "^9.4.4",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^4.8.4",
|
||||
"webpack": "^5.74.0",
|
||||
"typescript": "^5.2.2",
|
||||
"webpack": "^5.88.2",
|
||||
"webpack-cli": "^4.10.0",
|
||||
"webpack-dev-server": "^4.11.1"
|
||||
"webpack-dev-server": "^4.15.1"
|
||||
},
|
||||
"keywords": [
|
||||
"wasm",
|
||||
|
||||
@ -3,16 +3,11 @@ import metaUrlPlugin from '@chialab/esbuild-plugin-meta-url';
|
||||
import inlineWorker from 'esbuild-plugin-inline-worker';
|
||||
import yargs from "yargs";
|
||||
import process from "process";
|
||||
import chokidar from "chokidar";
|
||||
import {spawnSync} from "child_process"
|
||||
import {dirname} from "path";
|
||||
import {fileURLToPath} from "url";
|
||||
|
||||
let argv = yargs(process.argv.slice(2))
|
||||
.option('watch', {
|
||||
type: 'boolean',
|
||||
description: 'Enable watching'
|
||||
})
|
||||
.option('release', {
|
||||
type: 'boolean',
|
||||
description: 'Release mode'
|
||||
@ -73,7 +68,6 @@ let baseConfig = {
|
||||
let config = {
|
||||
...baseConfig,
|
||||
entryPoints: ['src/index.ts'],
|
||||
incremental: argv.watch,
|
||||
plugins: [
|
||||
inlineWorker({
|
||||
...baseConfig,
|
||||
@ -188,49 +182,9 @@ const wasmPack = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const watchResult = async (result) => {
|
||||
const watcher = chokidar.watch(['**/*.ts', '**/*.js', '**/*.rs'], {
|
||||
cwd: getProjectDirectory(),
|
||||
ignored: /dist|node_modules|target/,
|
||||
ignoreInitial: true,
|
||||
disableGlobbing: false,
|
||||
followSymlinks: false,
|
||||
});
|
||||
|
||||
const update = async (path) => {
|
||||
try {
|
||||
console.log(`Updating: ${path}`)
|
||||
if (path.endsWith(".rs")) {
|
||||
console.log("Rebuilding Rust...")
|
||||
wasmPack();
|
||||
}
|
||||
|
||||
console.log("Rebuilding...")
|
||||
await result.rebuild();
|
||||
|
||||
console.log("Emitting TypeScript types...")
|
||||
emitTypeScript();
|
||||
} catch (e) {
|
||||
console.error("Error while updating:")
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Watching...")
|
||||
watcher
|
||||
.on('ready', () => console.log('Initial scan complete. Ready for changes'))
|
||||
.on('add', update)
|
||||
.on('change', update)
|
||||
.on('unlink', update);
|
||||
}
|
||||
|
||||
const esbuild = async (name, globalName = undefined) => {
|
||||
let result = await build({...config, format: name, globalName, outfile: `dist/esbuild-${name}/module.js`,});
|
||||
|
||||
if (argv.watch) {
|
||||
console.log("Watching is enabled.")
|
||||
await watchResult(result)
|
||||
}
|
||||
console.log(result.errors.length === 0 ? "No errors." : "Found errors.")
|
||||
}
|
||||
|
||||
const start = async () => {
|
||||
|
||||
1598
web/lib/package-lock.json
generated
1598
web/lib/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -4,8 +4,6 @@
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"clean": "rm -rf dist && rm -rf src/wasm-pack",
|
||||
"watch": "node build.mjs --esm --watch",
|
||||
"watch-webgl": "node build.mjs --esm --webgl --watch",
|
||||
"build": "node build.mjs",
|
||||
"build-webgl": "node build.mjs --webgl"
|
||||
},
|
||||
@ -16,17 +14,16 @@
|
||||
"main": "dist/esbuild-cjs/main.js",
|
||||
"types": "dist/ts/index.d.ts",
|
||||
"dependencies": {
|
||||
"binaryen": "^110.0.0",
|
||||
"spectorjs": "^0.9.27",
|
||||
"wasm-feature-detect": "^1.3.0"
|
||||
"binaryen": "^114.0.0",
|
||||
"spectorjs": "0.9.27",
|
||||
"wasm-feature-detect": "^1.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@chialab/esbuild-plugin-meta-url": "^0.17.2",
|
||||
"chokidar": "^3.5.3",
|
||||
"esbuild": "^0.15.13",
|
||||
"@chialab/esbuild-plugin-meta-url": "^0.17.7",
|
||||
"esbuild": "^0.19.4",
|
||||
"esbuild-plugin-inline-worker": "^0.1.1",
|
||||
"typescript": "^4.8.4",
|
||||
"yargs": "^17.6.2"
|
||||
"typescript": "^5.2.2",
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user