{"name":"yoga-layout","version":"1.0.1","license":"BSD-3-Clause","_id":"yoga-layout@1.0.1","maintainers":[{"name":"emilsj","email":"emilsj@fb.com"}],"homepage":"https://github.com/facebook/yoga#readme","bugs":{"url":"https://github.com/facebook/yoga/issues"},"dist":{"shasum":"2ba33c3ef231b44e7d9977d89feaaeced63dd5fc","tarball":"http://registry-npm.ywwl.com/yoga-layout/download/yoga-layout-1.0.1.tgz","integrity":"sha512-NX4Ro/lLAlIzjEKd5LJXuTaiR3mPS07JNwx4WVcK410Cn42pCHjx+vfSKMjmfQINNTJ6aUI58AkyF88NMvPBZw==","signatures":[{"sig":"MEQCIHrln6gtNwOACBHhx8XLKdu4dq05CUFpadecH3JYh4JqAiA+9cWr0snwEUr2Rgbxw1DMH5zT1cjX3ulRJqoEpd4DJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":177514,"noattachment":false,"key":"/yoga-layout/-/yoga-layout-1.0.1.tgz"},"main":"./sources/entry-node","_from":".","_shasum":"2ba33c3ef231b44e7d9977d89feaaeced63dd5fc","browser":"./sources/entry-browser","scripts":{"test":"npm -- run test:all","bench":"node tests/run-bench $(find tests/Benchmarks -name '*.js')","build":"npm -- run build:all","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 -- 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"},"_npmUser":{"name":"emilsj","email":"emilsj@fb.com"},"repository":{"url":"git+ssh://git@github.com/facebook/yoga.git","type":"git"},"_npmVersion":"2.14.4","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":"4.1.1","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"},"_npmOperationalInternal":{"tmp":"tmp/yoga-layout-1.0.1.tgz_1485567408889_0.48747169016860425","host":"packages-12-west.internal.npmjs.com"},"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":1485567409105,"_cnpm_publish_time":1485567409105,"dist-tags":{"latest":"3.2.1"}}