scribunto-bundler is a TypeScript-written Lua bundler specifically designed for MediaWiki's Scribunto extension. It automates the process of resolving `require` statements within Lua modules, consolidating them into a single output file suitable for deployment on MediaWiki wikis. The current stable version is 0.2.7, with the project demonstrating a rapid release cadence, frequently publishing patch and minor versions, suggesting active development and iterative improvements. Key differentiators include its explicit support for Scribunto environments, automatic `require` statement detection, and compatibility with both `.lua` and `.luau` file extensions. It offers a command-line interface for scaffolding new projects and bundling existing ones, configurable via a `bundler.config.js` file, which is type-hinted for improved developer experience.
npm install scribunto-bundlerVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to set up, configure, and perform a programmatic bundle of a basic Scribunto Lua project. It outlines both CLI setup and direct API usage for advanced scenarios.
Refer to the official GitHub repository for potential migration guides or detailed changelogs if available. It is advisable to test upgrades thoroughly in a non-production environment.
Ensure your project's `package.json` specifies `"type": "module"` to enable ESM support, or rename your configuration file to `bundler.config.mjs` to explicitly mark it as an ES module for Node.js.
For project-specific operations, install locally as a `devDependency` and create `npm run` scripts to ensure all team members and CI/CD environments use the same bundler version and configuration.
Add `"type": "module"` to your project's `package.json` or rename `bundler.config.js` to `bundler.config.mjs`.
Verify the path specified in `config.main` within your `bundler.config.js` is correct and the file exists at that location.
Ensure that all Lua modules referenced by `require()` statements are placed in directories where `scribunto-bundler` can find them. Typically, this means they should be in the same directory as the requiring file or in subdirectories that follow Lua's module search path conventions, relative to the configured `main` file. Check module filenames and extensions (`.lua` or `.luau`).
No dependency data recorded yet.