Refactor entrypoints
This commit is contained in:
15
javascript/src_js/entrypoint/_entryAsync.js
Normal file
15
javascript/src_js/entrypoint/_entryAsync.js
Normal 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'),
|
||||
});
|
11
javascript/src_js/entrypoint/_entrySync.js
Normal file
11
javascript/src_js/entrypoint/_entrySync.js
Normal 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());
|
11
javascript/src_js/entrypoint/asmjs-async.js
Normal file
11
javascript/src_js/entrypoint/asmjs-async.js
Normal 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);
|
11
javascript/src_js/entrypoint/asmjs-sync.js
Normal file
11
javascript/src_js/entrypoint/asmjs-sync.js
Normal 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);
|
11
javascript/src_js/entrypoint/wasm-async.js
Normal file
11
javascript/src_js/entrypoint/wasm-async.js
Normal 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);
|
11
javascript/src_js/entrypoint/wasm-sync.js
Normal file
11
javascript/src_js/entrypoint/wasm-sync.js
Normal 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);
|
Reference in New Issue
Block a user