Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/samualtnorman/hackmud-script-manager. Script manager for game hackmud, with minification, TypeScrip www.npmjs.com/package/hackmud-script-manager
Something went wrong. Try again.
Files
- TypeScript 79%
- JavaScript 21%
- Shell <1%
README.md
# Hackmud Script Manager
Command made for [Hackmud Scripting Environment](https://github.com/samualtnorman/hackmud-environment), which is a scripting environment for hackmud with minification, autocompletes / intellisense, and TypeScript support.
Join [our Discord server](https://discord.gg/RSa4Sc6pNA)!
[](https://ko-fi.com/R6R0XN5CX)
You can read about how HSM works [in my blog post](https://samual.uk/blog/js-code-transformation-niche-environment/).
## Install
1. [Install Node.js](https://nodejs.org/en/download)
2. Run `npm install -g hackmud-script-manager`
## Usage
1. Run `#dir` in game, then `cd` to that folder
2. Name your source script file to `<name>.src.js`
3. Run `hsm minify <name>.src.js` and it will create a minified script file called `<name>.js`
> **NOTE:** If you get an error message that looks like this:
> ```
> [...]\AppData\Local\pnpm\hsm.ps1 cannot be loaded because running scripts is disabled on this system. [...]
> ```
> You will need to run `Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser` in PowerShell as an administrator. For more information, see [Microsoft's page about Execution Policies](https://learn.microsoft.com/en-gb/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4).



## Features
- Minification
- This includes auto quine cheating.
- Supported types are null, numbers, strings, and JSON compatible objects and arrays.
- Non JSON compatible object keys are quine cheated.
- Member expressions are converted to index notation so the index string can be quine cheated.
- And template literals are converted to string concatenation so the strings can be quine cheated.
…