bridge-compiler
v0.4.0
Published
Minecraft add-on utility. Powers bridge.'s custom addon syntax
Downloads
5
Readme
bridge-compiler
Provides the architecture to compile bridge.'s custom syntax without the use of a cache in the background.
This package will replace the default bridge. cache system in the future.
Usage
- Run
npm i -g bridge-compiler
- Create a config file for the compiler (
bridge.config.js
) - Run
bridge-compiler --config ./bridge.config.js
to compile the project
Example Config
In this example, the bridge/
folder contains compiler plugins.
const { homedir } = require('os')
const anyLanguage = require('./bridge/anyLanguage')
const {
registerCustomComponents,
resolveCustomComponents,
} = require('./bridge/customComponents')
const { asString, asJSON } = require('./bridge/utils')
module.exports = {
bp: './AstroExp BP',
rp: './AstroExp RP',
obp: `${homedir()}/AppData/Local/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/AstroExp BP`,
orp: `${homedir()}/AppData/Local/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_resource_packs/AstroExp RP`,
resolve: [
{
match: 'BP/blocks',
plugins: [asJSON(), resolveCustomComponents('block')],
},
{
match: 'BP/entities',
plugins: [asJSON(), resolveCustomComponents('entity')],
},
{
match: 'BP/items',
plugins: [asJSON(), resolveCustomComponents('item')],
},
{
match: 'BP/components',
doNotTransfer: true,
plugins: [asString(), registerCustomComponents()],
},
{
match: 'RP/texts/en_US.lang',
plugins: [asString(), anyLanguage()],
},
{
match: 'BP/bridge',
doNotTransfer: true,
},
],
}