The core logic is in a WASM binary. Download a release from https://github.com/ivanschuetz/capi/releases and unzip the contents in <project root>/wasm
(create wasm directory if needed). When doing this while the server is already running, just refresh the browser (it might be needed to clear the browser's cache).
npm install
Start:
npm run dev
Build:
npm build --release
Start:
npm start
In general it's helpful to enable format on save on the IDE.
For VSCode, install the Prettier extension.
With CLI, if needed, call this from the project's root to format all files:
npx prettier --write .
There should be no differences between CLI and VSCode formatting.
Note that running Prettier is also neecessary to sort correctly Tailwind attributes (this happens via the installed Tailwind Prettier plugin).
For VSCode, Install the Sass extension.
Create a branch, open a pull request and request a review. Use descriptive commit messages. Split work in commits that can be easily understood and reverted.
-
- It's recommended to add the following attributes to
tailwindCSS.classAttributes
, in order for autocomplete etc. to work in custom component properties:bgColor
- It's recommended to add the following attributes to
SVGs that use theme colors should be exported as components:
npx @svgr/cli -- <svg path>hello.svg > <project path>components/icons/SvgHello.tsx
Then remove colors from exported svg and pass as tailwind classes. Addjust size properties if needed. Orient with existing ones.