-
Notifications
You must be signed in to change notification settings - Fork 1
how to make a module
Ccode-lang edited this page Nov 1, 2021
·
6 revisions
Ccode modules are used by the import command.
Set up your project structure like:
module_name
-|
|_module_name.js
|
|_com.txt
Put your functions in module_name.js
then list them in com.txt
with one extra newline at the end.
module.js contents:
function test() {
console.log("hello_world");
}
function test_func() {
console.log("test");
}
com.txt contents:
test
test_func
You can use any commands declared in Builtins.js.
Open a pull at the pack-list
repo.
Don't import any commands in module files and try to use unique names for functions.
Welcome to the Ccode language wiki!