Refactor entrypoints

This commit is contained in:
Nick Gerleman
2022-12-23 23:49:35 -08:00
parent c829abf257
commit 0a82167c30
13 changed files with 48 additions and 22 deletions

View File

@@ -0,0 +1,15 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const wrapAsm = require('./wrapAsm');
module.exports = (loadAsm) => ({
loadYoga: () => loadAsm().then(wrapAsm),
...require('./generated/YGEnums'),
});

View File

@@ -0,0 +1,11 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const wrapAsm = require('./wrapAsm');
module.exports = (asm) => wrapAsm(asm());

View File

@@ -0,0 +1,11 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const asm = require('../build/asmjs-async');
module.exports = require("./entryAsync")(asm);

View File

@@ -0,0 +1,11 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const asm = require('../build/asmjs-sync');
module.exports = require("./entrySync")(asm);

View File

@@ -0,0 +1,11 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const asm = require('../build/wasm-async');
module.exports = require("./entryAsync")(asm);

View File

@@ -0,0 +1,11 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const asm = require('../build/wasm-sync');
module.exports = require("./entrySync")(asm);