If you have any questions, feel free to submit an issue or a PR!
- Determine the type of issue.
- Avoid submitting duplicate issues. Search existing issues before creating a new one.
- Fill out the issue form as completely as possible.
- Clearly indicate your intent in the tags, title, or description.
Once submitted, the libro maintainers will confirm the issue, update appropriate tags, and assign a developer.
-
Click the “Fork” button on the project page to fork the repository you want to contribute to.
-
Clone the forked repository to your local machine using the following command:
git clone https://github.com/<YOUR-GITHUB-USERNAME>/libro
Replace <YOUR-GITHUB-USERNAME>
with your GitHub username.
-
Clone the libro-server repository to your local machine:
git clone https://github.com/difizen/libro-server.git
-
We use rye to manage a Python monorepo containing multiple packages that share the same virtual environment (
venv
). Make sure you have Python installed and the rye Python management tool set up. -
Install and synchronize the required Python dependencies:
rye sync
-
Start the libro server:
cd libro rye run dev
If everything works, you will see the libro service running successfully.
Switch to your forked repository.
-
Install and synchronize the required dependencies:
pnpm bootstrap
-
Start the project in demo development mode:
pnpm run docs
-
Begin developing your code.
-
Run the following command to create a changelog entry for your changes:
pnpm run changeset
-
Follow the prompts to provide the following details:
- Which packages were modified?
- Are these changes major, minor, or patch?
- Add a brief description of the changes.
Create a new branch for your changes and submit a PR. The libro team will review your code and merge it into the main branch.
# Create a meaningful branch name (avoid names like 'update' or 'tmp')
git checkout -b branch-name
# Run tests to ensure everything passes. Add or modify tests as needed.
pnpm run ci:check
# After testing, commit your changes. Use a commit message that follows the convention below.
git add . # Use git add -u to stage deletions
git commit -m "fix(role): role.use must xxx"
git push origin branch-name
After pushing, create a Pull Request on the libro repository.
When submitting a PR, ensure it includes the following for better traceability:
- Requirements: Link to the related issue or add comments.
- Reason for Changes: Briefly explain why the changes are necessary.
- Test Points: Highlight critical test points (or link to test files).
- Key Areas of Attention: Mention anything users need to know, such as non-compatible updates.
Your code must adhere to eslint rules. You can run the following command locally to test:
pnpm run lint
Follow the Angular commit guidelines for clear commit history and automatic changelog generation.
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
-
Type The type of commit, such as:
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- style: Code format changes (no functional impact)
- refactor: Code refactoring (no functional impact)
- perf: Performance improvements
- test: Add or modify tests
- chore: Tooling changes (e.g., docs, code generation)
- deps: Dependency upgrades
-
Scope Specify the scope of the files modified.
-
Subject Write a brief description of what the commit does.
-
Body Expand on the subject with reasons or other relevant details (optional).
-
Footer
- Breaking Changes: Clearly describe any breaking changes here.
- Linked Issues: Reference related issues, e.g.,
Closes #1, Closes #2, #3
.
For more details, check the Angular Commit Guidelines.