[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
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)! [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](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). ![image](https://github.com/user-attachments/assets/cc97f8a6-82a4-4a66-9785-accc8d774285) ![image](https://github.com/user-attachments/assets/d0ec9450-4e16-4f8d-82b2-734deaf5abe3) ![image](https://github.com/user-attachments/assets/a59a6ec4-d268-40f7-8ce2-5fbdbcd40c19) ## 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. …