48 lines
1.6 KiB
JSON
48 lines
1.6 KiB
JSON
{
|
|
"name": "yoga-layout",
|
|
"version": "2.0.0-beta.1",
|
|
"description": "JavaScript bindings for the Yoga layout engine",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git@github.com:facebook/yoga.git"
|
|
},
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"browser": "./dist/entrypoint/wasm-async.js",
|
|
"node": "./dist/entrypoint/wasm-async.js",
|
|
"default": "./dist/entrypoint/asmjs-async.js"
|
|
},
|
|
"./sync": {
|
|
"browser": "./dist/entrypoint/asmjs-sync.js",
|
|
"node": "./dist/entrypoint/wasm-sync.js",
|
|
"default": "./dist/entrypoint/asmjs-sync.js"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist/**",
|
|
"src_js/**"
|
|
],
|
|
"scripts": {
|
|
"benchmark": "node tests/run-bench $(find tests/Benchmarks -name '*.js')",
|
|
"build": "yarn build:native && yarn build:js",
|
|
"build:configure": "which ninja && emcmake cmake -S . -B build -G Ninja || emcmake cmake -S . -B build",
|
|
"build:copy-dts": "cd src_js && find . -name '*.d.ts' | cpio -pdm ../dist",
|
|
"build:js": "babel src_js --source-maps --out-dir dist && yarn build:copy-dts",
|
|
"build:native": "yarn build:configure && cmake --build build",
|
|
"test": "yarn test:asmjs && yarn test:asmjs-sync && yarn test:wasm && yarn test:wasm-sync",
|
|
"test:asmjs": "WASM=0 SYNC=0 jest",
|
|
"test:asmjs-sync": "WASM=0 SYNC=1 jest",
|
|
"test:wasm": "WASM=1 SYNC=0 jest",
|
|
"test:wasm-sync": "WASM=1 SYNC=1 jest"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/cli": "^7.20.7",
|
|
"@babel/core": "^7.20.7",
|
|
"@babel/preset-env": "^7.20.2",
|
|
"jest": "^29.3.1"
|
|
}
|
|
}
|