rollup-plugin-lua
v0.0.2
Published
Rollup plugin for import and run Lua scripts
Downloads
2
Readme
rollup-plugin-lua
Rollup plugin for Lua scripts.
Installation
npm install --save-dev rollup-plugin-lua
Usage
rollup.config.js
import { rollup } from 'rollup';
import lua from 'rollup-plugin-lua';
rollup({
entry: 'src/app.js',
plugins: [
lua()
]
});
sum.lua
return function(x, y)
return x + y
end
app.js
import run from './sum.lua';
const sum = await run();
console.log(sum(10, 10)); // 20