ruffle/web/packages/core/package.json

49 lines
2.5 KiB
JSON
Raw Normal View History

{
"name": "ruffle-core",
"version": "0.1.0",
"description": "Core bindings for Ruffle",
"license": "(MIT OR Apache-2.0)",
"main": "./pkg/index.js",
"types": "./pkg/index.d.ts",
2020-11-17 22:53:17 +00:00
"files": [
"pkg/"
],
"scripts": {
"build": "npm run build:ruffle_web && npm run build:ruffle_web-wasm_extensions && npm run build:ts",
"//1": "# Unfortunately, we have to set $RUSTFLAGS here, instead of in .cargo/config.toml (for example), because it's not possible to specify them per-profile; see cargo issue #7878.",
"//2": "# Enabling 'build-std' would also be great, but it's not stable yet.",
"build:ruffle_web": "cross-env OUT_NAME=ruffle_web RUSTFLAGS=\"--cfg=web_sys_unstable_apis\" npm run build:cargo_bindgen_opt",
"build:ruffle_web-wasm_extensions": "echo \"Building module with WebAssembly extensions\" && cross-env OUT_NAME=ruffle_web-wasm_extensions RUSTFLAGS=\"--cfg=web_sys_unstable_apis -C target-feature=+bulk-memory,+simd128,+nontrapping-fptoint,+sign-ext\" npm run build:cargo_bindgen_opt",
"//3": "# This just chains together the three commands after it.",
"build:cargo_bindgen_opt": "npm run build:cargo && npm run build:wasm-bindgen && npm run build:wasm-opt",
"build:cargo": "cross-env-shell \"cargo build --release --target wasm32-unknown-unknown --features \\\"$CARGO_FEATURES\\\"\"",
"build:wasm-bindgen": "cross-env-shell \"wasm-bindgen ../../../target/wasm32-unknown-unknown/release/ruffle_web.wasm --target web --out-dir ./pkg --out-name $OUT_NAME\"",
"build:wasm-opt": "cross-env-shell \"wasm-opt -o ./pkg/${OUT_NAME}_bg.wasm -O -g ./pkg/${OUT_NAME}_bg.wasm || npm run build:wasm-opt-failed\"",
2021-12-17 14:18:56 +00:00
"build:wasm-opt-failed": "echo 'NOTE: Since wasm-opt could not be found (or it failed), the resulting module might not perform that well, but it should still work.' && echo ; [ \"$CI\" != true ] # > nul",
"build:ts": "tsc -d && node tools/set_version.js",
"docs": "typedoc",
"test": "cross-env TS_NODE_COMPILER_OPTIONS={\\\"module\\\":\\\"commonjs\\\"} mocha"
2020-05-17 22:37:33 +00:00
},
"dependencies": {
"wasm-feature-detect": "^1.2.11"
},
2020-05-17 22:37:33 +00:00
"devDependencies": {
2021-10-01 18:10:27 +00:00
"@types/mocha": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"eslint": "^8.6.0",
"eslint-plugin-jsdoc": "^37.1.0",
"mocha": "^9.1.3",
"replace-in-file": "^6.3.2",
"ts-node": "^10.4.0",
"typedoc": "^0.22.10",
"typescript": "^4.5.2"
}
}