3.2 KiB
Contributing to jBase
First off, thank you for considering contributing to jBase! It's people like you that make the open-source community such an amazing place to learn, inspire, and create.
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests.
⚡ Quick Start
- Fork the repository on GitHub.
- Clone your fork locally:
git clone [https://github.com/k37z3r/jBase-2.git](https://github.com/k37z3r/jBase-2.git) cd jbase - Install dependencies:
npm install - Build the project to ensure everything works:
node build.js
🛠 Development Workflow
1. Branching
Always create a new branch for your work. Do not commit directly to main.
- Features:
feature/my-new-feature - Bugfixes:
fix/issue-description - Docs:
docs/update-readme
2. Coding Standards
We enforce a strict coding style to maintain quality across the framework.
- Language: TypeScript (Strict mode).
- Formatting:
- Indentation: 4 Spaces (Check
.editorconfig). - Quotes: Single quotes preferred.
- Semicolons: Always use semicolons.
- Indentation: 4 Spaces (Check
- Documentation:
- Language: English only. No German comments in the source code.
- JSDoc: Every exported function must have a JSDoc block describing parameters and return values.
- SSR Safety:
- Never access
windowordocumentglobally in logic that might run on the server. - Use
isBrowser()check for effects/animations. - Use
getDoc(this)orel.ownerDocumentfor DOM access.
- Never access
3. Commit Messages
We follow the Conventional Commits specification. This helps in generating changelogs automatically.
feat: add new slideDown animationfix: resolve crash in unwrap methoddocs: update installation guideperf: optimize object search algorithmrefactor: clean up event binding
🚀 Building the Project
The project uses a custom esbuild script. Before submitting a PR, make sure the build succeeds without errors.
node build.js
This command generates:
dist/jbase.min.js(Browser)dist/index.mjs(ESM)dist/index.cjs(CommonJS)dist/server.js(Node.js/SSR)dist/*.d.ts(Type Definitions)
🐞 Reporting Bugs
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy!
Great Bug Reports tend to have:
- A quick summary and/or background.
- Steps to reproduce.
- What you expected would happen.
- What actually happened.
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work).
📝 Pull Requests
- Push your changes to your fork.
- Open a Pull Request against the
mainbranch of thejBaserepository. - Describe your changes clearly.
- Link to any related issues (e.g., "Closes #12").
- Wait for a code review. We might ask for changes before merging.
Happy Coding! 🚀