|
| 1 | +# Contributing to CodeMirror 6 LaTeX Language Support |
| 2 | + |
| 3 | +Thank you for your interest in contributing to this project! This document provides guidelines and instructions for contributing. |
| 4 | + |
| 5 | +## Development Setup |
| 6 | + |
| 7 | +1. Clone the repository: |
| 8 | + ``` |
| 9 | + git clone https://github.com/texlyre/codemirror-lang-latex.git |
| 10 | + cd codemirror-lang-latex |
| 11 | + ``` |
| 12 | + |
| 13 | +2. Install dependencies: |
| 14 | + ``` |
| 15 | + npm install |
| 16 | + ``` |
| 17 | + |
| 18 | +3. Build the project: |
| 19 | + ``` |
| 20 | + npm run build |
| 21 | + ``` |
| 22 | + |
| 23 | +4. Run the webpack example: |
| 24 | + ``` |
| 25 | + npm run setup-example |
| 26 | + npm run example |
| 27 | + ``` |
| 28 | + |
| 29 | +5. Run the GitHub Pages example: |
| 30 | + ``` |
| 31 | + npm run setup-pages-example |
| 32 | + npm run pages-example |
| 33 | + ``` |
| 34 | + |
| 35 | +## Project Structure |
| 36 | + |
| 37 | +- `grammar/` - Contains the LaTeX grammar files used to generate the parser |
| 38 | +- `src/` - Source code for the CodeMirror extension |
| 39 | +- `example/` - Contains example applications showing the extension in use |
| 40 | +- `scripts/` - Utility scripts for building and generating files |
| 41 | +- `dist/` - Build output (generated) |
| 42 | + |
| 43 | +## Making Changes |
| 44 | + |
| 45 | +1. Create a new branch for your changes: |
| 46 | + ``` |
| 47 | + git checkout -b feature/your-feature-name |
| 48 | + ``` |
| 49 | + |
| 50 | +2. Make your changes to the codebase. |
| 51 | + |
| 52 | +3. Build the project to ensure your changes compile: |
| 53 | + ``` |
| 54 | + npm run build |
| 55 | + ``` |
| 56 | + |
| 57 | +4. Test your changes using the example application: |
| 58 | + ``` |
| 59 | + npm run example |
| 60 | + ``` |
| 61 | + |
| 62 | +5. Commit your changes with a clear and descriptive commit message. |
| 63 | + |
| 64 | +6. Push your branch to your fork: |
| 65 | + ``` |
| 66 | + git push origin feature/your-feature-name |
| 67 | + ``` |
| 68 | + |
| 69 | +7. Create a pull request to the main repository. |
| 70 | + |
| 71 | +## Coding Guidelines |
| 72 | + |
| 73 | +- Follow the existing code style in the project |
| 74 | +- Write clear, documented code |
| 75 | +- Add comments for complex functionality |
| 76 | +- Update documentation when necessary |
| 77 | + |
| 78 | +## Pull Request Process |
| 79 | + |
| 80 | +1. Ensure your code builds without errors |
| 81 | +2. Update the README.md with details of changes if appropriate |
| 82 | +3. Your pull request will be reviewed by the maintainers |
| 83 | +4. Address any requested changes |
| 84 | + |
| 85 | +## License |
| 86 | + |
| 87 | +By contributing to this project, you agree that your contributions will be licensed under the project's [MIT License](LICENSE). |
0 commit comments