mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-04 22:58:29 +08:00
Switched to Yarn 2 and PnP.
This commit is contained in:
parent
c633176925
commit
922db80097
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,13 +1,15 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# Editors
|
||||
# editors
|
||||
.idea
|
||||
.vscode
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
.yarn/*
|
||||
!.yarn/releases
|
||||
!.yarn/plugins
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
.pnp.*
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
@ -24,6 +26,7 @@
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
55
.yarn/releases/yarn-berry.cjs
vendored
Normal file
55
.yarn/releases/yarn-berry.cjs
vendored
Normal file
File diff suppressed because one or more lines are too long
1
.yarnrc.yml
Normal file
1
.yarnrc.yml
Normal file
@ -0,0 +1 @@
|
||||
yarnPath: ".yarn/releases/yarn-berry.cjs"
|
@ -42,6 +42,7 @@
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"copy-webpack-plugin": "^6.0.3",
|
||||
"css-loader": "^3.6.0",
|
||||
"dotenv": "^8.2.0",
|
||||
"dotenv-webpack": "^2.0.0",
|
||||
"eslint": "^7.9.0",
|
||||
"eslint-config-prettier": "^6.12.0",
|
||||
@ -51,10 +52,12 @@
|
||||
"html-webpack-plugin": "^4.3.0",
|
||||
"jest": "^26.4.2",
|
||||
"jest-canvas-mock": "^2.2.0",
|
||||
"jquery": "^3.5.1",
|
||||
"mini-css-extract-plugin": "^0.9.0",
|
||||
"monaco-editor-webpack-plugin": "^1.9.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
||||
"pnp-webpack-plugin": "^1.6.4",
|
||||
"prettier": "^2.0.5",
|
||||
"terser-webpack-plugin": "^2.3.7",
|
||||
"ts-jest": "^26.4.0",
|
||||
|
@ -7,10 +7,8 @@ import { Cursor } from "../../block/cursor/Cursor";
|
||||
import { ArrayBufferCursor } from "../../block/cursor/ArrayBufferCursor";
|
||||
import { Endianness } from "../../block/Endianness";
|
||||
|
||||
type PrsRsModule = typeof import("prs-rs");
|
||||
|
||||
class PrsWasm {
|
||||
constructor(private module: PrsRsModule) {}
|
||||
constructor(private module: any) {}
|
||||
|
||||
public prs_compress_wasm(cursor: Cursor): Cursor {
|
||||
const bytes = new Uint8Array(cursor.array_buffer());
|
||||
|
@ -2,7 +2,7 @@
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"lib": ["es6", "dom", "dom.iterable"],
|
||||
"lib": ["esnext", "dom", "dom.iterable"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
@ -12,7 +12,7 @@
|
||||
"resolveJsonModule": true,
|
||||
"moduleResolution": "node",
|
||||
"noEmit": true,
|
||||
"experimentalDecorators": true,
|
||||
"typeRoots" : ["./node_modules/@types", "./typedefs"]
|
||||
}
|
||||
"experimentalDecorators": true
|
||||
},
|
||||
"include": ["typedefs"]
|
||||
}
|
||||
|
@ -15,8 +15,6 @@
|
||||
},
|
||||
"include": [
|
||||
"src",
|
||||
"typedefs",
|
||||
// Adding WebGPU types via "typeRoots" doesn't work for an unknown reason.
|
||||
"node_modules/@webgpu/types/dist/index.d.ts"
|
||||
"typedefs"
|
||||
]
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ const path = require("path");
|
||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
|
||||
const { ProvidePlugin } = require("webpack");
|
||||
const PnpWebpackPlugin = require(`pnp-webpack-plugin`);
|
||||
|
||||
module.exports = {
|
||||
entry: "./src/index.ts",
|
||||
@ -10,6 +11,14 @@ module.exports = {
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".js", ".ts"],
|
||||
plugins: [
|
||||
PnpWebpackPlugin,
|
||||
],
|
||||
},
|
||||
resolveLoader: {
|
||||
plugins: [
|
||||
PnpWebpackPlugin.moduleLoader(module),
|
||||
],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
|
Loading…
Reference in New Issue
Block a user