Hast is a project created by Maxims Enterprise that allows you to create simple files that you can run to the terminal as it would in a 'Makefile'
First download the files and use this command to copy the 'Hast' folder to your bash folder:
mv ./hast/src /usr/local/bin
chmod +x hast.sh
mv hast.sh /usr/local/bin/hastBe sure to have Deno installed
To start create a 'Hastentry' or '.hast' file in your location
touch Hastentry
touch a.hastThen, open your Hastentry in your desire IDE or Text Editor. ex.
sudo nano ./Hastentry
code ./Hastentry
nvim ./Hastentry
fleet ./HastentryIf you want you can install our Visual Studio Code Extension here: -
To run a .hast or a Hastentry file, type to the console:
- If you want to run the
mainsection:hast - If you want to run the
clearsection:hast clear - If you want to run the
runsection:hast run - If you want to run custom sections:
hast customName
Be aware that thedatasection will always run
Be aware that to run acustomsection it needs to be declared withhast-custom
A 'Hastentry' is divided in 4 locations:
Each section is defined by putting hast- in front of each name, like this:
hast-data
hast-main
hast-clear
hast-run
hast-custom
There are two types of locations:
This is defined with: hast-data and it usually goes at the beggining of the file, there you define variables following this pattern:
hast-data
*This defines a variable like:*
*$varName: varVal*
$hello: Hello, World!
$bye: Bye, World!
In other entries like: hast-main, hast-run or hast-clear you can do two commands:
You can print things to the screeen:
hast-data
$hello: Hello,
hast-main
(print) $(hello) World!
Be aware that variables overlap like this.
Use (run) to run commands:
hast-data
$path = ./hello/main.ts
hast-main
(run) touch $(path)