Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

macrocompile

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

macrocompile

Compile a macromod script and its dependencies into one large inlined script

  • 1.0.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

macrocompile

A command line tool to automatically "recompile" macromod scripts when a change in any script dependency is detected. By "compile" we refer to the process of recursive inline-replacement of dependent scripts, removal of comments and whitespace, and the obfuscation of variable names.

Installation

Using npm:

npm i macrocompile -g

Usage

From command line:

macrocompile

Or:

macrocompile -i

To only run compilation for the specified scripts once, not watching for file changes.

Configuration

You must configure the file %node_path%/npm_modules/macrocompile/config.json before running. It comes with a default set of options:

OptionDefaultDescription
removeWhitespacetrueControls whether whitespace is removed
obfuscatetrueWhether variables are renamed to shorter forms
blockFormattruePuts multiple statements on one line, up to a maximum width
maxWidth70Maximum width of each combined line, except for original long lines

As well, the scripts you wish to compile, as well as their compiled-version name, must be specified as an array of objects, and a path to your scripts folder:

"scriptsFolder":
    "C:\\Users\\YOUR USERNAME HERE\\AppData\\Roaming\\.minecraft\\liteconfig\\common\\macros\\",
"scripts": [
    {
    "name": "digBot_source.txt",
    "compiledName": "digBot.txt"
    },
    {
    "name": "fooBot_source.txt",
    "compiledName": "fooBot.txt"
    }
],

Purpose

Beyond a certain level of nesting, macromod scripts develop strange bugs that arise from the script runtime agent itself. To prevent this, the script is compiled into one large file that has no external dependencies.

Keywords

FAQs

Package last updated on 29 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc