To get started with Mochaccino, you can run the following commands:
Create a new folder for your Mochaccino project
Initialise your Mochaccino project using the Barista, the package manager for Mochaccino
Your folder structure will look something like this:
Typically, you will write your code in the main folder, and create additional folders inside in if necessary. The tests folder is to write tests for your Mochaccino project. The scripts folder allows you to define custom Barista commands and create other automations. However, refrain from writing .moc programs outside the src folder, as they will be outside your project scope. More on that in the next section.
Meet the Barista
Barista is the package manager for Mochaccino, and allows you to manage Mochaccino projects and work with them. Barista has two main parts to it: the CLI toolkit which allows you to run .moc files, scripts, and tests, as well as the mochaccino.configs.json file, which holds configurations for a Mochaccino project.
The Barista configuration file keeps track of .moc files and packages in your project. Barista can only see .moc files that are within the project scope, which is a list of folders that Barista searches when looking for packages, conducting static analysis, etc. By default, only the src/main folder is in the project’s scope. However, you can add more folders or files to the project scope manually via Barista:
barista scope add "path/to/fileOrFolder"
Otherwise, files outside the project scope are invisible to those inside it.