Skip to main content

Install / Usage

The Yock authorsAbout 1 min

Install

NOTE: Regardless of the installation method, you need to mount yock to the local environment after downloading. After extracting the package, go to the directory of the executable and run yock run install.lua to complete the process.

Note

Using third package manager has the problem of version lag, and even though package will be uncompressed with automatical, it's still required to execute install.lua by hand, and therefore it's highly recommended to download by binary way.

https://github.com/Ansurfen/yock/releases

Enviroment

Tips

The main goal of this step is to write code more efficiently, so it's optional.
And yock don't directly provides official plugins, but use thrid party lua's plugin to get it. Therefore, the following plugins are only recommended.

For VSCode:
lua-tip

For Jetbrain products (such as IDEA, goland, and etc):
lua-tip

Usage

When yock run install.lua is executed successfully, you can create a working directory to write and test yock scripts. Run ypm tidy to complete the code definition, and it will create an include directory in the working directory with source files for plugin prompts only.

-- main.lua
print("Hello World")
fmt.Printf("Hello %s!\n", "Yock")

Create a main.lua file and write down the above. Use yock run main.lua execution. If all goes well, you'll see the output in the terminal. At this point, Yock's development environment is configured. The next chapter begins with an introduction to the specific use of yock.