@keneanung/nexus-package-splitter
v0.3.0
Published
Tool to split an Iron Realms Nexus package file into a builder-compatible YAML definition and individual files
Readme
Package splitter for Iron Realms Nexus
This package performs the inverse operation of @keneanung/nexus-package-builder: it takes a Nexus .nxs package file, splits embedded code into individual files, and creates a YAML definition that can be rebuilt with the package builder.
Usage
Installation
npm install @keneanung/nexus-package-splitterRunning the tool
npx nexus-package-splitter <package.nxs> <output-dir>Examples:
npx nexus-package-splitter ./eventbus.nxs ./outputThis command will create ./output/eventbus.yaml and write any extracted codeFile/scriptFile sources below ./output/eventbus/.
The generated output directory also includes a package.json that references @keneanung/nexus-package-builder, a package script, and the YAML schema comment for editor support.
Working with the generated project
After splitting a package you can move into the output directory, install the builder dependency, edit the YAML and extracted source files, and rebuild the package:
cd ./output
npm install
npm run packageThis will rebuild eventbus.yaml into ./dist/eventbus.nxs.
If you prefer to run the builder manually instead of using the generated script, you can still do so with:
npx nexus-package-builder ./output/eventbus.yaml ./rebuilt