Getting Started
The API is very simple to use and get started with. Depending on what you'd like to make, you're going to need to do different things. The Cheddar source code is located in the src/
directory.
Creating a namespace/class
If you wish to create a global namespace or class, make sure you've followed the instructions specified in the Structure article. <name>
represents the name of your library.
Locate
stdlib.es6
in thestdlib/
directory.Locate the text
/** Global Libraries **/
. Directly underneath this, create a line in the following format:Now in
ns/<name>.es6
. Set the contents to the template:<implementation>
is to be replaced with your implementation. Thecheddar
variable, introduced by the function, is the API.<implementation>
should not be wrapped as a variable. The API and it's details are described in the following sections.
Adding items to your Namespace
If you're creating a namespace. Set ns/<name>.es6
to:
where <data>
is a 2D array representing the namespace's items. The most common format of a namespace looks like:
Creating a Class
To create a class. You can use the following format:
More information on classes will be available once more documentation is written.
Last updated