|
| 1 | +# Contributing to Exprify |
| 2 | + |
| 3 | +First off, thanks for taking the time to contribute! |
| 4 | + |
| 5 | +Contributions are welcome — whether it's reporting a bug, discussing improvements, or submitting a pull request. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Getting Started |
| 10 | + |
| 11 | +```bash |
| 12 | +git clone https://github.com/code-hemu/exprify.git |
| 13 | +cd exprify |
| 14 | +npm install |
| 15 | +npm run build |
| 16 | +``` |
| 17 | + |
| 18 | +## Development Workflow |
| 19 | + |
| 20 | +| Command | Description | |
| 21 | +|---|---| |
| 22 | +| `npm test` | Run Jest test suite | |
| 23 | +| `npm run test:coverage` | Run tests with coverage report | |
| 24 | +| `npm run lint` | Lint source with ESLint | |
| 25 | +| `npm run lint:fix` | Auto-fix lint issues | |
| 26 | +| `npm run format:check` | Check formatting with Prettier | |
| 27 | +| `npm run format` | Auto-format all files with Prettier | |
| 28 | +| `npm run typecheck` | Type-check with TypeScript (`tsc --noEmit`) | |
| 29 | +| `npm run build` | Clean and rebuild all dist bundles | |
| 30 | + |
| 31 | +**Before submitting a PR**, make sure: |
| 32 | +- `npm run lint` passes |
| 33 | +- `npm run typecheck` passes |
| 34 | +- `npm test` passes (all tests green) |
| 35 | +- `npm run format:check` passes |
| 36 | + |
| 37 | +## Project Structure |
| 38 | + |
| 39 | +``` |
| 40 | +exprify/ |
| 41 | +├── src/ # Source code (ESM) |
| 42 | +├── test/ # Jest test files |
| 43 | +├── dist/ # Build output (ESM, CJS, UMD, minified) |
| 44 | +├── docs/ # Documentation assets |
| 45 | +└── .github/ # CI workflows and config |
| 46 | +``` |
| 47 | + |
| 48 | +## Pull Request Process |
| 49 | + |
| 50 | +1. **Fork** the repository. |
| 51 | +2. **Create a branch**: `git checkout -b feature/your-feature` — use prefixes like `feature/`, `fix/`, or `docs/`. |
| 52 | +3. **Make your changes** — keep the PR focused on a single concern. |
| 53 | +4. **Run all checks** — lint, typecheck, tests, format. |
| 54 | +5. **Commit** your changes with a clear message: `git commit -m "Add your feature"` |
| 55 | +6. **Push** your branch: `git push origin feature/your-feature` |
| 56 | +7. **Open a pull request** against the `master` branch. |
| 57 | + |
| 58 | +Your PR will be reviewed. Please respond to any feedback — it's appreciated, not required. |
| 59 | + |
| 60 | +## Style & Conventions |
| 61 | + |
| 62 | +- Code is formatted with **Prettier** (see `.prettierrc`). |
| 63 | +- Linting rules are enforced via **ESLint** (see `eslint.config.js`). |
| 64 | +- The project uses **ESM** (`"type": "module"`) — use `import`/`export` syntax. |
| 65 | +- Follow the patterns you see in existing source and tests. |
| 66 | + |
| 67 | +## Reporting Issues |
| 68 | + |
| 69 | +Report bugs and request features via [GitHub Issues](https://github.com/code-hemu/exprify/issues). |
| 70 | + |
| 71 | +When reporting a bug, include: |
| 72 | +- A clear title and description |
| 73 | +- Steps to reproduce |
| 74 | +- Expected vs actual behavior |
| 75 | +- Environment (Node version, browser, OS) |
| 76 | +- Minimal example code if possible |
| 77 | + |
| 78 | +## License |
| 79 | + |
| 80 | +By contributing, you agree that your contributions will be licensed under the [GPL-3.0 License](LICENSE). |
0 commit comments