{"name":"yoga-layout","version":"1.6.0","license":"BSD-3-Clause","_id":"yoga-layout@1.6.0","maintainers":[{"name":"emilsj","email":"emilsj@fb.com"},{"name":"fb","email":"opensource+npm@fb.com"}],"homepage":"https://github.com/facebook/yoga#readme","bugs":{"url":"https://github.com/facebook/yoga/issues"},"dist":{"shasum":"82046dab9b4940ad2868f0d795bf7e3517e96382","tarball":"http://registry-npm.ywwl.com/yoga-layout/download/yoga-layout-1.6.0.tgz","integrity":"sha512-xIxXK1Vni8rLks9ukGGNQdr0d+z/jBJbNjSmFwN+V2KUJM6ksnMN4HE7LZevo23s3C/hZG73DEuQkFF50q2BUg==","signatures":[{"sig":"MEUCIQC1OiaWBMtyQu0oGOSMe3VthsHuj5MLp7Fh8YQvfLKDxwIgKXdNLzLiAOIM9Pezja6BXqSMYssKI2jgLcZfcB4aEb4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":221563,"noattachment":false,"key":"/yoga-layout/-/yoga-layout-1.6.0.tgz"},"main":"./sources/entry-node","_from":".","config":{"platform":"all"},"_shasum":"82046dab9b4940ad2868f0d795bf7e3517e96382","browser":"./sources/entry-browser","scripts":{"test":"npm -- run test:all","bench":"node tests/run-bench $(find tests/Benchmarks -name '*.js')","build":"cross-env \"npm --if-present -- run build:$npm_package_config_platform\"","which":"which","install":"npm -- run autogypi && npm -- run build:node","prepare":"npm -- run build:browser","autogypi":"autogypi","node-gyp":"node-gyp","test:all":"npm -- run test:node && npm -- run test:browser","build:all":"npm -- run build:node && npm -- run build:browser && npm -- run build:standalone","emcc-path":"emcc-path","test:node":"TEST_ENTRY=node time mocha --expose-gc -r tests/tools.js tests/Facebook.Yoga/**/*.js","build:node":"npm -- run copy-sources && npm -- run node-gyp configure build","copy-sources":"! npm -s -- run is-monolithic || (rsync -r --checksum --delete ../yoga/ sources/yoga/)","test:browser":"TEST_ENTRY=browser time mocha --expose-gc -r tests/tools.js tests/Facebook.Yoga/**/*.js","build:browser":"npm -- run copy-sources && npm -- run node-gyp configure build --asmjs=1","is-monolithic":"test \"$(basename \"$(pwd)\")\" = javascript","build:standalone":"webpack","postbuild:browser":"babel build/Release/nbind.js --out-file build/Release/nbind.js"},"_npmUser":{"name":"emilsj","email":"emilsj@fb.com"},"repository":{"url":"git+ssh://git@github.com/facebook/yoga.git","type":"git"},"_npmVersion":"4.1.2","description":"Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.","directories":{},"_nodeVersion":"7.6.0","dependencies":{"nbind":"^0.3.8","autogypi":"^0.2.2","node-gyp":"^3.4.0"},"devDependencies":{"mocha":"^3.2.0","webpack":"^2.2.0-rc.2","babel-cli":"^6.24.1","cross-env":"^4.0.0","babel-core":"^6.25.0","babel-plugin-replace-require":"^0.0.4"},"_npmOperationalInternal":{"tmp":"tmp/yoga-layout-1.6.0.tgz_1499971559585_0.22822912083938718","host":"s3://npm-registry-packages"},"readme":"# yoga-layout\n\nThis package provides prebuilt WebAssembly bindings for the Yoga layout engine.\n\nSee more at https://yogalayout.dev\n\n## Usage\n\n```ts\nimport {Yoga, Align} from 'yoga-layout';\n\nconst node = Yoga.Node.create();\nnode.setAlignContent(Align.Center);\n```\n\nObjects created by `Yoga.<>.create()` are not automatically garbage collected and should be freed once they are no longer in use.\n\n```ts\n// Free a config\nconfig.free();\n\n// Free a tree of Nodes\nnode.freeRecursive();\n\n// Free a single Node\nnode.free();\n```\n\n## Requirements\n\n`yoga-layout` requires a toolchain that supports ES Modules and top-level await.\n\nIf top-level-await is not supported, use the `yoga-layout/load` entry point instead. This requires to load yoga manually:\n\n```ts\nimport {loadYoga, Align} from 'yoga-layout/load';\n\nconst node = (await loadYoga).Node.create();\nnode.setAlignContent(Align.Center);\n```\n","publish_time":1499971561061,"_cnpm_publish_time":1499971561061,"dist-tags":{"latest":"3.2.1"}}