NOTE: This Application is built with SvelteKit, please familiarize yourself with it before contributing to the non-Markdown (
.md) files.
IMPORTANT: Before creating Pull Requests, search both the existing issues and Pull Requests. Otherwise your contributions might be declined.
IMPORTANT: Before creating Pull Requests, it's recommended to file a new issue to discuss your changes. Especially if it's something bigger than a quick fix change.
- Node.js —
>= 16.0.0
This is a monorepo that used pnpm to handle workspacing. Start by installing pnpm via npm globally:
npm install pnpm -gThen clone the repository:
git clone https://github.com/kahi-framework/kahi-ui.nbn.dev.git
cd kahi-ui.nbn.devFinally install the dependencies of all the subpackages via pnpm:
pnpm installNOTE: Currently the development server does not support hot-reload of Markdown (
.md) files. You will need to either reload or switch pages to see any changes.
To start working with the Application, start the dev:application script:
npm run dev:applicationWhich should open a webserver at localhost:3000, which will allow you to see your changes hot-reloaded.
Whenever you're ready to deploy the Application, simply use the build:application script:
npm run build:applicationIt should take a few minutes, and if successfully built, you should get the output in packages/@kahi-docs-web/build/. You can test out the build with the preview:application script:
npm run preview:applicationAfter you finish making / testing out your changes, file a new Pull Request. Check the following checklist of stuff you need:
- Include a properly formatted changelog in the body of your PR.
Once your PR is passing tests, the CI will post a comment with a preview link of your build.
Both projects are using Prettier for formatting code, which you can see the .prettierrc here. It is recommended to configure your IDE to run formatting on file save.
The Markdown (.md) content files have a slightly different .prettierrc here so that code snippets are more readable in the Application.
When editing the codebase keep these guidelines in mind:
- Identation: 4 Spaces
- Constants:
UPPER_SNAKE_CASE - Classes:
PascalCase - Class Members:
snake_case - Functions:
snake_case - HTML Attributes / Elements:
kebab-case - Functions:
snake_case - Svelte Actions:
snake_case - Svelte Components:
PascalCase - Svelte Component Properties:
snake_case - Svelte Stores:
flatcase