A workspace to build and minify your scripts, fit with typings for hackmud.
First, run yarn
to install dependencies and install TypeScript (npm install -g typescript
)
You can make scripts in src/
in either TypeScript or JavaScript and make scripts as you reqularly would without the worry of variable name length.
You can set the autocomplete string either by a comment after the function header:
function (context, args) { // example:true
Or by adding an @autocomplete
comment above the function call.
// @autocomplete example:true
function (context, args) {
When doing any CLI commands, a hackmud.json file will be created. In order for pushing to work, you must set the path
key to the hackmud folder (not a scripts folder) and set the default_user
to the user you want the scripts for.
To compile, you can run yarn build
to build src/
files to dist/
. To push, you can run yarn push
.
To do both of these in one go, run yarn fastpush
/hl = kernel.hardline
/dc = kernel.hardline {dc:true}
/c = chats.send {{ channel:"{0}", msg:{1} }}
/t = chats.tell {{ to:"{0}", msg:{1} }}
Contributing to the repo is appreciated, especially if you have an API and want to make a definition in the typings.