Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ari-party/scribunto-bundler
Lua bundler focused on Scribunto
https://github.com/ari-party/scribunto-bundler
bundler lua mediawiki scribunto
Last synced: 4 months ago
JSON representation
Lua bundler focused on Scribunto
- Host: GitHub
- URL: https://github.com/ari-party/scribunto-bundler
- Owner: ari-party
- License: mit
- Created: 2024-01-29T00:00:49.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-07-25T11:35:16.000Z (6 months ago)
- Last Synced: 2024-09-27T05:23:01.537Z (4 months ago)
- Topics: bundler, lua, mediawiki, scribunto
- Language: TypeScript
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# scribunto-bundler
[![npm version](https://badge.fury.io/js/scribunto-bundler.svg)](https://badge.fury.io/js/scribunto-bundler)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)A Lua bundler written in TypeScript for [Scribunto](https://www.mediawiki.org/wiki/Extension:Scribunto).
Automatically detects require statements.scribunto-bundler has support for `.lua` and `.luau` file extensions.
## Installation
```bash
$ npm install scribunto-bundler --global
# or
$ pnpm add scribunto-bundler --global
```## Usage
### `create`
Creates a [basic project](https://github.com/ari-party/scribunto-bundler/tree/main/templates/create) and installs scribunto-bundler locally using **npm**.
```bash
$ npx scribunto-bundler --create
# or
$ pnpx scribunto-bundler --create
```### `bundle`
Bundles the main lua file with its defined modules. Modules are only loaded once on [`require()`](https://www.lua.org/pil/8.1.html).
```bash
$ npm run bundle
# or
$ pnpm bundle
```### Configuration
```js
// bundler.config.js/** @type {import("scribunto-bundler").Config} */
export default {
prefix: 'Text that goes infront of the bundled code, e.g. license',
suffix: 'Text that goes after the bundled code',main: 'src/main.lua', // Your main lua file
out: 'dist/bundled.lua', // The destination file for the bundle command
};
```