|
| 1 | +# fluent-vue-loader Contributing Guide |
| 2 | + |
| 3 | +- [Issue Reporting Guidelines](#issue-reporting-guidelines) |
| 4 | +- [Pull Request Guidelines](#pull-request-guidelines) |
| 5 | +- [Development Setup](#development-setup) |
| 6 | + |
| 7 | +## General Guidelines |
| 8 | + |
| 9 | +English is used as the common language to communicate with Maintainers. If description of issue / PR are written in |
| 10 | +non-English languages, those may be closed. |
| 11 | + |
| 12 | +## Issue Reporting Guidelines |
| 13 | + |
| 14 | +- Try to search for your issue, it may have already been answered or even fixed in the development branch. |
| 15 | + |
| 16 | +- Check if the issue is reproducible with the latest stable version of Vue. If you are using a pre-release, please |
| 17 | + indicate the specific version you are using. |
| 18 | + |
| 19 | +- It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear reproduction steps may be closed. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed. |
| 20 | + |
| 21 | +- For bugs that involves build setups, you can create a reproduction repository with steps in the `README` file. |
| 22 | + |
| 23 | +- If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it. |
| 24 | + |
| 25 | +## Pull Request Guidelines |
| 26 | + |
| 27 | +- Make sure `pnpm test` passes. (see [development setup](#development-setup)) |
| 28 | + |
| 29 | +- If adding new feature: |
| 30 | + |
| 31 | + - Add accompanying test case. |
| 32 | + |
| 33 | + - Provide convincing reason to add this feature. Ideally you should open a suggestion issue first to discuss with the Maintainers/Community before working on it. |
| 34 | + |
| 35 | +- If fixing a bug: |
| 36 | + - Provide detailed description of the bug in the PR. Live demo preferred. |
| 37 | + |
| 38 | + - Add appropriate test coverage if applicable. |
| 39 | + |
| 40 | +### Work Step Example |
| 41 | + |
| 42 | +- Fork the repository from [fluent-vue/fluent-vue-loader][#repo] |
| 43 | +- Create your topic branch from `main`: |
| 44 | + |
| 45 | + ```shell |
| 46 | + git branch my-new-topic origin/main |
| 47 | + ``` |
| 48 | + |
| 49 | +- Write new code and relevant tests |
| 50 | +- Run test and lint scripts |
| 51 | +- Commit your changes: `git commit -am 'add feature X'` |
| 52 | +- Push to the branch: `git push origin my-new-topic` |
| 53 | +- Submit a pull request to `main` branch of `fluent-vue/fluent-vue-loader` repository |
| 54 | + |
| 55 | +## Development Setup |
| 56 | + |
| 57 | +You will need [Node.js][#node] and [`pnpm`][#pnpm] and the code base is mainly written in [TypeScript][#ts] |
| 58 | + |
| 59 | +After cloning the repo, run: |
| 60 | + |
| 61 | +```shell |
| 62 | +pnpm install |
| 63 | +``` |
| 64 | + |
| 65 | +### Commonly used NPM scripts |
| 66 | + |
| 67 | +```shell |
| 68 | +# lint source codes |
| 69 | +$ pnpm lint |
| 70 | + |
| 71 | +# run unit tests with Jest |
| 72 | +$ pnpm test |
| 73 | + |
| 74 | +# build all dist files |
| 75 | +$ pnpm build |
| 76 | +``` |
| 77 | + |
| 78 | +[#repo]: https://github.com/fluent-vue/fluent-vue-loader |
| 79 | +[#pnpm]: https://pnpm.io/ |
| 80 | +[#node]: http://nodejs.org |
| 81 | +[#ts]: https://www.typescriptlang.org/ |
0 commit comments