ignore
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
.git/
|
.git/
|
||||||
.obj/
|
.obj/
|
||||||
|
website/
|
||||||
bin/
|
bin/
|
||||||
build/
|
build/
|
||||||
*.zip
|
*.zip
|
||||||
|
|||||||
25
CLAUDE.md
Normal file
25
CLAUDE.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Code style
|
||||||
|
All code is done with 2 spaces for indentation.
|
||||||
|
|
||||||
|
For cell script and its integration files, objects are preferred over classes, and preferrably limited use of prototypes, make objects sendable between actors (.ce files).
|
||||||
|
|
||||||
|
## cell script format
|
||||||
|
Cell script files end in .ce or .cm. Cell script is similar to Javascript but with some differences.
|
||||||
|
|
||||||
|
Variables are delcared with 'var'. Var behaves like let.
|
||||||
|
Constants are declared with 'def'.
|
||||||
|
!= and == are strict, there is no !== or ===.
|
||||||
|
There is no undefined, only null.
|
||||||
|
There are no classes, only objects and prototypes.
|
||||||
|
Prefer backticks for string interpolation. Otherwise, convering non strings with the text() function is required.
|
||||||
|
Everything should be lowercase.
|
||||||
|
|
||||||
|
There are no arraybuffers, only blobs, which work with bits. They must be stoned like stone(blob) before being read from.
|
||||||
|
|
||||||
|
## c format
|
||||||
|
For cell script integration files, everything should be declared static that can be. Most don't have headers at all. Files in a package are not shared between packages.
|
||||||
|
|
||||||
|
There is no undefined, so JS_IsNull and JS_NULL should be used only.
|
||||||
|
|
||||||
|
## how module loading is done in cell script
|
||||||
|
Within a package, a c file, if using the correct macros (CELL_USE_FUNCS etc), will be loaded as a module with its name; so png.c inside ac package is loaded as <package>/png, giving you access to its functions.
|
||||||
Reference in New Issue
Block a user