Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

add-on-releaser

8Crafter-Studios198MIT0.1.0TypeScript support: included

8Crafter's MCBE Add-On Releaser

8Crafter, MCBE, Add-On, Releaser, CLI, Node.js, Module, Minecraft Bedrock Edition

readme

8Crafter's MCBE Add-On Releaser

Thumbnail

NPM Downloads NPM Version NPM License NPM Last Update NPM Unpacked Size GitHub last commit Discord

This is a command-line tool that handles every step of generating the release files for your Minecraft Bedrock Edition add-on for you.

It can:

  • Add the files from your development behavior and resource packs into a .mcaddon file.
  • Remove development folders such as src and node_modules.
  • Remove development files such as package.json and package-lock.json.
  • Update the add-on's version number.
  • Apply any desired modifications to the release files automatically, including adding, removing, renaming, and moving file and folders.

It uses a configuration file called add-on-releaser-config.json to specify the options.

You can have as many packs as you want included in the .mcaddon file.

Installation

npm i -g add-on-releaser

CLI

Usage:

add-on-releaser [configPath]            Generate the release files.
add-on-releaser --update                Update the Add-On Releaser.
add-on-releaser -u                      Update the Add-On Releaser.
add-on-releaser --version               Get the current version of the Add-On Releaser.
add-on-releaser -v                      Get the current version of the Add-On Releaser.

Parameters:

configPath      The path to the configuration file. Defaults to "./add-on-releaser-config.json".

Configuration

The schema can be accessed at: https://raw.githubusercontent.com/8Crafter-Studios/Add-On-Releaser/refs/heads/main/8crafters-add-on-releaser-config.schema.json

Here is the default configuration file (Note: You will need to modify a few options for it to work):

{
    "$schema": "https://raw.githubusercontent.com/8Crafter-Studios/Add-On-Releaser/refs/heads/main/8crafters-add-on-releaser-config.schema.json",
    "cwd": "./",
    "destination": "./Release Files", // Set this to the directory you want the generated .mcaddon file to be placed in.
    "packs": [
        {
            "path": "./BP", // The path to the behavior pack.
            "release_name": "bp", // The folder name of the behavior pack in the .mcaddon file.
            "modifications": [
                {
                    "type": "delete_folders",
                    "targets": ["src", "node_modules", ".git", ".vscode", "deprecated"] // This is a list of folders that will not be included in the release files.
                },
                {
                    "type": "delete_files",
                    "targets": [
                        ".git",
                        ".eslintrc",
                        ".gitignore",
                        ".gitmodules",
                        ".hintrc",
                        ".gitattributes",
                        ".mcattributes",
                        "desktop.ini",
                        "package.json",
                        "package-lock.json",
                        "jsconfig.json",
                        "tsconfig.json",
                        "tsconfig.tsbuildinfo"
                    ] // This is a list of files that will not be included in the release files.
                }
            ]
        },
        {
            "path": "./RP", // The path to the resource pack.
            "release_name": "rp", // The folder name of the resource pack in the .mcaddon file.
            "modifications": [
                {
                    "type": "delete_folders",
                    "targets": ["node_modules", ".git", ".vscode", "deprecated", "blockbench_models"] // This is a list of folders that will not be included in the release files.
                },
                {
                    "type": "delete_files",
                    "targets": [
                        ".git",
                        ".eslintrc",
                        ".gitignore",
                        ".gitmodules",
                        ".hintrc",
                        ".gitattributes",
                        ".mcattributes",
                        "desktop.ini",
                        "package.json",
                        "package-lock.json",
                        "jsconfig.json",
                        "tsconfig.json",
                        "tsconfig.tsbuildinfo"
                    ] // This is a list of files that will not be included in the release files.
                }
            ]
        }
    ],
    "file_type": "mcaddon",
    "file_name": "myaddon-v${version}", // Set this to the name you want the .mcaddon file to have, ${version} will be replaced with the version of the pack.
    "file_name_version": {
        "format": "dashed"
    },
    "release_version_format": "tuple"
}

changelog

v0.1.0

Additions

  • Added Changelog.md.
  • Added support for generating mcpack files instead of a single mcaddon file.
  • The CLI now tells you when a new update is available.
  • Added the --version option to the CLI to get the current version.
  • Added the --update option to the CLI to update the current version (Note: If your system does not support child_process, you will need to run npm update add-on-releaser to update manually).
  • Added an error message when the config file is not found, instead of it just throwing the long error.

Changes

  • When using the find_and_replace_in_file modification type, any occurrences of ${version} in the replace string will be replaced with the detected version number of the pack (To put ${version} in the replace string, use ${version\\}).
  • Specifying the UUID of the pack to get the version number from is no longer required, if not specified, the version of the first pack in the packs array will be used.

Removals

  • Deleted the .d.ts.map and .js.map files to reduce the package size.

v0.0.3

Fixes

  • Fixed a few typos in README.md.

v0.0.2

Additions

  • Added a README.md file.
  • Added the following information to package.json:
    • engines
    • keywords
    • preferGlobal
    • contributors

Fixes

  • Fixed a bug where the version was incorrectly set to 1.0.0 instead of 0.0.1 in the script.

v0.0.1

  • Initial release