(feat): add package.json for easy wasm installs
Some checks failed
CI / rustfmt (push) Failing after 23s
CI / clippy (push) Successful in 1m51s
CI / wasm build (push) Successful in 1m33s
CI / test (push) Successful in 2m21s
CI / example usage (push) Successful in 1m42s
CI / duplicate code (push) Successful in 11s
CI / cargo-machete (push) Successful in 1m38s
CI / web client (push) Failing after 24s
CI / cargo-deny (push) Failing after 3m23s

(feat): add code quality control
(fix): ci rewritten for forgejo
(qol): move docs to dedicated docs/ folder
This commit is contained in:
Alois 2026-06-27 02:32:43 +02:00
commit 22245e673d
20 changed files with 354 additions and 112 deletions

29
package.json Normal file
View file

@ -0,0 +1,29 @@
{
"name": "mtp-wasm",
"version": "0.1.0",
"description": "Browser WASM interface for MTP.",
"type": "module",
"module": "./wasm/pkg/mtp_wasm.js",
"types": "./wasm/pkg/mtp_wasm.d.ts",
"exports": {
".": {
"types": "./wasm/pkg/mtp_wasm.d.ts",
"import": "./wasm/pkg/mtp_wasm.js",
"default": "./wasm/pkg/mtp_wasm.js"
}
},
"files": [
"wasm/pkg/mtp_wasm.js",
"wasm/pkg/mtp_wasm.d.ts",
"wasm/pkg/mtp_wasm_bg.wasm",
"wasm/pkg/mtp_wasm_bg.wasm.d.ts"
],
"scripts": {
"build": "MTP_TYPE_MAPS=$PWD/example-usage/type-maps.yaml RUSTFLAGS='--cfg web_sys_unstable_apis' wasm-pack build wasm --target web --out-dir pkg --release",
"build:all": "nix run .#build-all",
"dup": "jscpd --pattern '**/*.rs' --ignore 'target/**' --ignore 'wasm/pkg/**' --ignore '.git/**' --min-lines 8 --min-tokens 80 --threshold 4 --reporters console --no-tips ."
},
"devDependencies": {
"jscpd": "5.0.11"
}
}