From 78a0d95e74eb3c4c2a4f383fe7aebe6ec8b1652a Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 22 Jan 2018 16:44:00 +1100 Subject: Workaround linit/lualib cyclic reference --- src/lualib.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/lualib.js') diff --git a/src/lualib.js b/src/lualib.js index 4e98432..78f441f 100644 --- a/src/lualib.js +++ b/src/lualib.js @@ -1,14 +1,15 @@ "use strict"; const { - LUA_VERSION_MAJOR, - LUA_VERSION_MINOR + LUA_VERSION_MAJOR, + LUA_VERSION_MINOR } = require("./lua.js"); -const linit = require('./linit.js'); const LUA_VERSUFFIX = "_" + LUA_VERSION_MAJOR + "_" + LUA_VERSION_MINOR; module.exports.LUA_VERSUFFIX = LUA_VERSUFFIX; +module.exports.lua_assert = function(c) {}; + const LUA_COLIBNAME = "coroutine"; module.exports.LUA_COLIBNAME = LUA_COLIBNAME; module.exports.luaopen_coroutine = require("./lcorolib.js").luaopen_coroutine; @@ -51,7 +52,5 @@ const LUA_LOADLIBNAME = "package"; module.exports.LUA_LOADLIBNAME = LUA_LOADLIBNAME; module.exports.luaopen_package = require("./loadlib.js").luaopen_package; +const linit = require('./linit.js'); module.exports.luaL_openlibs = linit.luaL_openlibs; - -/* customary export */ -module.exports.lua_assert = function(c) {}; -- cgit v1.2.3-54-g00ecf