Match xplat/yoga/javascript prettier conventions

Summary:
Match Prettier config to match other Meta OSS projects

Didn't update the test generator to use this form yet.

Reviewed By: yungsters

Differential Revision: D45570415

fbshipit-source-id: d5fd791b047debf41c28aecac75fb8dde16da3e3
This commit is contained in:
Nick Gerleman
2023-05-09 15:35:42 -07:00
committed by Facebook GitHub Bot
parent 0cb4a49d38
commit 0a6a581936
29 changed files with 197 additions and 199 deletions

View File

@@ -8,17 +8,17 @@
*/
module.exports = async () => {
if (process.env["SYNC"] === "1" && process.env["WASM"] === "1") {
globalThis.Yoga = require("./dist/entrypoint/wasm-sync");
} else if (process.env["SYNC"] === "1") {
globalThis.Yoga = require("./dist/entrypoint/asmjs-sync");
} else if (process.env["WASM"] === "1") {
globalThis.Yoga = await require("./dist/entrypoint/wasm-async").loadYoga();
if (process.env['SYNC'] === '1' && process.env['WASM'] === '1') {
globalThis.Yoga = require('./dist/entrypoint/wasm-sync');
} else if (process.env['SYNC'] === '1') {
globalThis.Yoga = require('./dist/entrypoint/asmjs-sync');
} else if (process.env['WASM'] === '1') {
globalThis.Yoga = await require('./dist/entrypoint/wasm-async').loadYoga();
} else {
globalThis.Yoga = await require("./dist/entrypoint/asmjs-async").loadYoga();
globalThis.Yoga = await require('./dist/entrypoint/asmjs-async').loadYoga();
}
};
Object.defineProperty(globalThis, "YGBENCHMARK", {
Object.defineProperty(globalThis, 'YGBENCHMARK', {
get: () => globalThis.test,
});