Hi! We're really excited and happy to see that you're contributing to Arclix. Before submitting your contribution, please read through the following guide.
- Make sure you have Node.js which includes
npm
greater than v14.
To develop and test the docs Arclix
:
- Run
npm i
in arclix-docs root folder. - Run
npm start
to start the dev server. - Do the changes you want in the Arclix.
- Make sure you doesn't break any of the existing code.
To use breakpoints and explore code execution, you can use the "Run and Debug" feature from VS Code.
-
Add a
debugger
statement where you want to stop the code execution. -
Click the "Run and Debug" icon in the activity bar of the editor, which opens the Run and Debug view.
-
Click the "JavaScript Debug Terminal" button in the Run and Debug view, which opens a terminal in VS Code.
-
From that terminal, go to
playground/xxx
, and runpnpm run dev
. -
The execution will stop at the
debugger
statement, and you can use the Debug toolbar to continue, step over, and restart the process...
-
Checkout a topic branch from a base branch (e.g.
master
), and merge back against that branch. -
If adding a new feature:
- Add accompanying test case.
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first, and have it approved before working on it.
-
If fixing a bug:
- If you are resolving a special issue, add
fix: remove something (#issue id) #PR id
in your PR title for a better release log (e.g.fix: remove something (#1) #2
). - Provide a detailed description of the bug in the PR. Live demo preferred.
- Add appropriate test coverage if applicable.
- If you are resolving a special issue, add
-
It's OK to have multiple small commits as you work on the PR. GitHub can automatically squash them before merging.
-
No need to worry about code style as long as you have installed the dev dependencies. Modified files are automatically formatted with Prettier on commit (by invoking Git Hooks via husky).
-
PR title must follow the commit message convention so that changelogs can be automatically generated.
Arclix aims to be lightweight, and this includes being aware of the number of npm dependencies and their size.
Most deps should be added to devDependencies
even if they are needed at runtime. Some exceptions are:
- Type packages. Example:
@types/*
. - Deps that cannot be properly bundled due to binary files. Example:
esbuild
.
Avoid deps with large transitive dependencies that result in bloated size compared to the functionality it provides. For example, http-proxy
itself plus @types/http-proxy
is a little over 1MB in size, but http-proxy-middleware
pulls in a ton of dependencies that make it 7MB(!) when a minimal custom middleware on top of http-proxy
only requires a couple of lines of code.