Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ceifa/rollup-plugin-lua
https://github.com/ceifa/rollup-plugin-lua
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ceifa/rollup-plugin-lua
- Owner: ceifa
- Created: 2021-05-07T20:37:20.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-05-08T14:49:45.000Z (over 3 years ago)
- Last Synced: 2024-10-19T08:17:50.983Z (26 days ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rollup-plugin-lua [![npm package](https://img.shields.io/npm/v/rollup-plugin-lua.svg)](https://www.npmjs.com/package/rollup-plugin-lua)
Rollup plugin for Lua scripts.
## Installation
```bash
npm install --save-dev rollup-plugin-lua
```## Usage
### rollup.config.js
```js
import { rollup } from 'rollup';
import lua from 'rollup-plugin-lua';rollup({
entry: 'src/app.js',
plugins: [
lua()
]
});
```### sum.lua
```lua
return function(x, y)
return x + y
end
```### app.js
```js
import run from './sum.lua';const sum = await run();
console.log(sum(10, 10)); // 20
```