Lua library for plotting graphics, tables, and content in plain HTML.
Requires darwin v0.20.0+. Check with:
darwin --versionInstall darwin:
curl -L https://github.com/OUIsolutions/Darwin/releases/download/0.20.0/darwin.c -o darwin.c && gcc darwin.c -o darwin.out && sudo mv darwin.out /usr/local/bin/darwin && rm darwin.cList available recipes (located in builds):
darwin listBuild all:
darwin run_blueprint --target allBuild a specific recipe:
darwin run_blueprint --target <recipe_name>The project lives in src/ with the following layout:
| Path | Read Every Time | Description |
|---|---|---|
src/ |
no | Source code root |
src/privateModuleTypes.lua |
yes | Private type annotations |
src/publicModuleTypes.lua |
yes | Public type annotations (exported to release dir) |
src/InternalObjectsTyps.lua |
yes | Type hints for internal objects |
src/PrivateModule/ |
no | All PrivateModule function implementations |
src/PrivateModule/lib_start.lua |
yes | The lib initialization (return PublicModule) |
Each function in PrivateModule lives in its own .lua file named after the function.
Example: PrivateModule.newNotebook → src/PrivateModule/newNotebook.lua
(js,css,images,fonts,etc) must be stored in assets folder, and they can be retrived by the lib
using the function PrivateModule.get_asset(asset_name: string): string
the project use a replacement mechanic, if you need to create a markdown or a sample ,create inside template dir when the recipe templates its runned, it aplys the replacment using the REPLACERS var inside darwinconf.lua
what ever public function or method you need to create, fowlow these steps:
- implement the code
- write into [template/samples/.lua] a sample of usage the lib
- write into [template/docs/public_api.md] a documentation of the function