Skip to main content

Run

Now that you have downloaded LemonScript, you can now execute and run scripts!

Firstly, make sure that you are in the LemonScript directory with all the files. Then run the command ts-node index.ts. This will execute the main script for LemonScript. Once you have done that, you should see something like this:

Example Pic

To exit the LemonScript terminal, you can simply press Ctrl + C.

Now once you have have this, you can either run code directly in the terminal:

Example Pic

Or run files. To run whole files, you can use the command lsc run [file].

Create a folder called inputfiles in the LemonScript directory and create a file inside of it called helloworld.lemon. Inside of the file, write the following code:

print("Hello World!")

If you are not in the LemonScript terminal, rerun the ts-node index.ts command. Then type the command lsc run inputfiles/helloworld.lemon. inputfiles/helloworld.lemon is the path to the file that we just wrote. If you have done everything correctly, it should work and look like this:

Example Pic

And that is how you can input files to be executed.

Now that you know how to execute files with LemonScript, it is now up to you to create what ever you want! To learn how to code in LemonScript, you can read the LemonScript Documentation. Many detailed examples covering the functionality of LemonScript can be found here.