An open API service indexing awesome lists of open source software.

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

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)