Full contributing guidelines are kept at
mor.ele.me/guides/contributing. This
page is a quick-start reference.
Repository Structure
MorJS is a Lerna monorepo. All packages live underpackages/ and are
published independently to npm under the @morjs scope.
Setting Up the Dev Environment
Install dependencies
MorJS uses npm workspaces managed by Lerna. Run the standard install at
the repo root:This installs all workspace dependencies and links local packages to each
other.
Build all packages
lib/ and esm/
directories.Running Tests
Tests are colocated with each package and run via Lerna:Commit Convention
MorJS enforces Conventional Commits via commitlint. Every commit message must follow the pattern:| Type | When to use |
|---|---|
feat | A new feature |
fix | A bug fix |
docs | Documentation only |
style | Formatting, whitespace (no logic change) |
refactor | Code restructuring without behaviour change |
perf | Performance improvement |
test | Adding or fixing tests |
chore | Tooling, CI, build scripts |
revert | Reverting a previous commit |
@morjs/ prefix, e.g.:
Pull Request Process
Make your changes
- Keep changes focused. One logical change per PR makes reviews faster.
- Add or update tests to cover the new behaviour.
- Update relevant documentation if the public API changes.
Open a pull request
Push your branch and open a PR against
main on GitHub. Fill in the PR
template:- What — summarise what changed.
- Why — explain the motivation.
- How to test — describe the manual or automated steps to verify.
Fixes #<issue> in the description.Code Style
- TypeScript is required for all new code under
packages/. - Existing ESLint and Prettier configuration is enforced via pre-commit hooks.
- Run
npm run lintin a package to check locally before committing.
Reporting Issues
Bug reports
Open a GitHub issue with a minimal reproduction. Include your MorJS
version, target platform, and the error output.
Feature requests
Describe the use case and the desired behaviour. PRs that come with a
linked issue are merged faster.