https://github.com/bernhardfritz/lua-amalg-webpack-plugin
Bundle your Lua scripts with webpack
https://github.com/bernhardfritz/lua-amalg-webpack-plugin
lua webpack
Last synced: 7 days ago
JSON representation
Bundle your Lua scripts with webpack
- Host: GitHub
- URL: https://github.com/bernhardfritz/lua-amalg-webpack-plugin
- Owner: bernhardfritz
- License: mit
- Created: 2021-12-25T18:28:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-26T16:21:21.000Z (over 4 years ago)
- Last Synced: 2025-02-20T08:44:31.228Z (about 1 year ago)
- Topics: lua, webpack
- Language: JavaScript
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lua-amalg-webpack-plugin
This plugin uses lua-amalg to bundle your Lua scripts.
## Getting Started
To begin, you'll need to install `lua-amalg-webpack-plugin`:
```console
npm install --save-dev lua-amalg-webpack-plugin
```
Then add the plugin to your `webpack` config. For example:
**webpack.config.js**
```js
const LuaAmalgWebpackPlugin = require('lua-amalg-webpack-plugin');
module.exports = {
plugins: [new LuaAmalgWebpackPlugin()],
};
```
And run `webpack` via your preferred method.
## Options
| Name | Type | Default | Description |
| :-----------------------------: | :------: | :------------: | :------------------------------------------ |
| **[`main`](#main)** | `String` | `src/main.lua` | Primary entry point to your program. |
| **[`outputFile`](#outputFile)** | `String` | `bundle.lua` | Concatenate and emit output to single file. |
### `main`
Type: `String`
Default: `src/main.lua`
Primary entry point to your program.
```js
module.exports = {
plugins: [
new LuaAmalgWebpackPlugin({
main: 'src/main.lua',
}),
],
};
```
### `outputFile`
Type: `String`
Default: `bundle.lua`
Concatenate and emit output to single file.
```js
module.exports = {
plugins: [
new LuaAmalgWebpackPlugin({
outputFile: 'bundle.lua',
}),
],
};
```
# Examples
* [hello-lua](examples/hello-lua/README.md)
# License
[MIT](./LICENSE)