{"_id":"@bcherny/yoga-wasm-web","_rev":"1-dbec536c0b9c65eda381c622d0e7a6cd","name":"@bcherny/yoga-wasm-web","dist-tags":{"latest":"0.3.5"},"versions":{"0.3.4":{"name":"@bcherny/yoga-wasm-web","version":"0.3.4","license":"MIT","_id":"@bcherny/yoga-wasm-web@0.3.4","maintainers":[{"name":"bcherny","email":"boris@borischerny.com"}],"homepage":"https://github.com/shuding/yoga-wasm-web#readme","bugs":{"url":"https://github.com/shuding/yoga-wasm-web/issues"},"dist":{"shasum":"5de1738b08c42b5ed1a5cd3d23883eb0e56a11c3","tarball":"https://registry.npmjs.org/@bcherny/yoga-wasm-web/-/yoga-wasm-web-0.3.4.tgz","fileCount":9,"integrity":"sha512-6+u7MOKBL2hOQX23/Eh7id2Z9C6edAGtuwY5l33ehD0xGcNfxTuidg+eGNiggWhrs6/l6lWWfbLLhB02inHcxA==","signatures":[{"sig":"MEQCIDLMkq0lzdf9Op4nHley7A44xAfxQ7dvVgDIgm0kxDvQAiADeSQ0z1Gesl9o3JvBDE/4NZfA3fI6y9SUPleX76WcmQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":139219},"main":"./dist/node.js","type":"module","types":"dist/index.d.ts","gitHead":"fb1236db7e7134ee6fe9a80f629f10d22c4898d5","scripts":{"test":"pnpm test:asm && pnpm test:wasm","build":"make && rollup -c","test:wasm":"vitest run --dir ./test","typecheck":"tsc --noEmit"},"_npmUser":{"name":"bcherny","email":"boris@borischerny.com"},"repository":{"url":"git+https://github.com/shuding/yoga-wasm-web.git","type":"git"},"_npmVersion":"10.8.2","description":"[Yoga](https://github.com/facebook/yoga) but in WebAssembly.","directories":{},"_nodeVersion":"20.18.1","publishConfig":{"registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/yoga-wasm-web_0.3.4_1735241355044_0.3327094043566432","host":"s3://npm-registry-packages-npm-production"}},"0.3.5":{"name":"@bcherny/yoga-wasm-web","version":"0.3.5","type":"module","types":"dist/index.d.ts","main":"./dist/node.js","scripts":{"build":"make && rollup -c","typecheck":"tsc --noEmit","test":"pnpm test:asm && pnpm test:wasm","test:wasm":"vitest run --dir ./test"},"publishConfig":{"registry":"https://registry.npmjs.org"},"repository":{"type":"git","url":"git+https://github.com/shuding/yoga-wasm-web.git"},"license":"MIT","_id":"@bcherny/yoga-wasm-web@0.3.5","gitHead":"f83b23d4589f10c36580e08840b13f7b4cb04f46","description":"[Yoga](https://github.com/facebook/yoga) but in WebAssembly.","bugs":{"url":"https://github.com/shuding/yoga-wasm-web/issues"},"homepage":"https://github.com/shuding/yoga-wasm-web#readme","_nodeVersion":"20.18.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-tMEY6QY8kKoywUG0SVNWRgSoDLhH4MI17VWbHKTJU1XmmFD9TcGF5EX3gdZBuG3iDZrLb0mbyd4DkUIwaycW8w==","shasum":"591396bc343077b1e785f6b302b762c6eb73a61d","tarball":"https://registry.npmjs.org/@bcherny/yoga-wasm-web/-/yoga-wasm-web-0.3.5.tgz","fileCount":9,"unpackedSize":139284,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEaRcQvfymjkjyf7M7SqACSwPBSJ9hhwp6TMQ6FucwzfAiEA43mBRVKQgQpY0zsJes+FZDE8/o5L7gGJnSONhdQvxEA="}]},"_npmUser":{"name":"bcherny","email":"boris@borischerny.com"},"directories":{},"maintainers":[{"name":"bcherny","email":"boris@borischerny.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/yoga-wasm-web_0.3.5_1735241646336_0.7795004387249145"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-26T19:29:14.963Z","modified":"2024-12-26T19:34:06.709Z","0.3.4":"2024-12-26T19:29:15.278Z","0.3.5":"2024-12-26T19:34:06.534Z"},"bugs":{"url":"https://github.com/shuding/yoga-wasm-web/issues"},"license":"MIT","homepage":"https://github.com/shuding/yoga-wasm-web#readme","repository":{"type":"git","url":"git+https://github.com/shuding/yoga-wasm-web.git"},"description":"[Yoga](https://github.com/facebook/yoga) but in WebAssembly.","maintainers":[{"name":"bcherny","email":"boris@borischerny.com"}],"readme":"# yoga-wasm-web\n\n[Yoga](https://github.com/facebook/yoga) but in WebAssembly.\n\n## Usage\n\nInstall with your package manager:\n\n```sh\nnpm i @bcherny/yoga-wasm-web\n```\n\n### WASM\n\nTo use the WASM build (take Node.js as an example):\n\n```js\nimport fs from \"fs\";\nimport initYoga, { ALIGN_CENTER } from \"@bcherny/yoga-wasm-web\";\n\nconst Yoga = await initYoga(\n  fs.readFileSync(\"./node_modules/@bcherny/yoga-wasm-web/dist/yoga.wasm\")\n);\n\nconst node = Yoga.Node.create();\nnode.setAlignContent(ALIGN_CENTER);\n```\n\nYou can use other ways to provide the WASM binary too.\n\n## Contribution\n\nTo develop this project locally, you need to clone the repo and fetch the yoga submodule first. Also, [emcc](https://emscripten.org/docs/getting_started/downloads.html) is required to build this project too.\n\nAfter that, install npm dependencies:\n\n```sh\npnpm i\n```\n\nAnd run the build script:\n\n```sh\npnpm build\n```\n\nAnd run the tests:\n\n```sh\npnpm test\n```\n\n# Acknowledgements\n\nThis project was started as **opinionated** fork from [pinqy520/yoga-layout-wasm](https://github.com/pinqy520/yoga-layout-wasm)\n","readmeFilename":"README.md"}