Skip to content

Commit 5fa6e39

Browse files
committed
update contributing guide
1 parent 705f1a6 commit 5fa6e39

File tree

1 file changed

+63
-14
lines changed

1 file changed

+63
-14
lines changed

.github/CONTRIBUTING.md

+63-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
# vue-i18n-loader Contributing Guide
1+
# @intlify/vue-i18n-loader Contributing Guide
22

33
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
44
- [Pull Request Guidelines](#pull-request-guidelines)
55
- [Development Setup](#development-setup)
6+
- [Contributing Tests](#contributing-tests)
7+
- [Financial Contribution](#financial-contribution)
68

79
## Issue Reporting Guidelines
810

911
- The issue list of this repo is **exclusively** for bug reports and feature requests. Non-conforming issues will be closed immediately.
1012

1113
- Try to search for your issue, it may have already been answered or even fixed in the master branch.
1214

13-
- Check if the issue is reproducible with the latest stable version of vue-i18n-loader. If you are using a pre-release, please indicate the specific version you are using.
15+
- Check if the issue is reproducible with the latest stable version of `intlify/vue-i18n-loader`. If you are using a pre-release, please indicate the specific version you are using.
1416

1517
- It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled `Status: Need More Info` receives no further input from the issue author for more than 5 days, it will be closed.
1618

@@ -20,7 +22,7 @@
2022

2123
## Pull Request Guidelines
2224

23-
- Checkout a topic branch from the `master` branch.
25+
- Checkout a topic branch from the `v1.x` branch.
2426

2527
- It's OK to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging.
2628

@@ -35,28 +37,75 @@
3537
- Add appropriate test coverage if applicable.
3638

3739
### Work Step Example
38-
- Fork the repository from [intlify/vue-i18n-loader](https://github.com/intlify/vue-i18n-loader) !
39-
- Create your topic branch from `master`: `git branch my-new-topic origin/master`
40+
- Fork the repository from [`intlify/vue-i18n-loader`](https://github.com/intlify/vue-i18n-loader) !
41+
- Create your topic branch from `v1.x`: `git branch my-new-topic origin/master`
4042
- Add codes and pass tests !
4143
- Commit your changes: `git commit -am 'Add some topic'`
4244
- Push to the branch: `git push origin my-new-topic`
43-
- Submit a pull request to `master` branch of `intlify/vue-i18n-loader` repository !
45+
- Submit a pull request to `v1.x` branch of `intlify/vue-i18n-loader` repository !
4446

4547
## Development Setup
4648

49+
You will need [Node.js](http://nodejs.org) **version 10+**, and [Yarn](https://yarnpkg.com/en/docs/install).
50+
4751
After cloning the repo, run:
4852

49-
$ npm install
53+
```bash
54+
$ yarn # install the dependencies of the project
55+
```
56+
57+
58+
A high level overview of tools used:
59+
60+
- [TypeScript](https://www.typescriptlang.org/) as the development language
61+
- [Rollup](https://rollupjs.org) for bundling
62+
- [Jest](https://jestjs.io/) for unit testing
63+
- [Puppeteer](https://pptr.dev/) for e2e testing
64+
- [ESLint](https://eslint.org/) for code linting
65+
- [Prettier](https://prettier.io/) for code formatting
66+
67+
## Scripts
68+
69+
### `yarn build`
70+
71+
The `build` script builds transpile to CommonJS module file.
72+
73+
### `yarn test`
74+
75+
The `yarn test` script simply calls the `jest` binary, so all [Jest CLI Options](https://jestjs.io/docs/en/cli) can be used. Some examples:
76+
77+
```bash
78+
# run all tests
79+
$ yarn test
80+
81+
# run unit tests
82+
$ yarn test:unit
83+
84+
# run unit test coverages
85+
$ yarn test:coverage
86+
87+
# run unit tests in watch mode
88+
$ yarn test:watch
89+
90+
# run e2e tests
91+
$ yarn test:e2e
92+
```
93+
94+
## Contributing Tests
95+
96+
Unit tests are collocated with directories named `test`. Consult the [Jest docs](https://jestjs.io/docs/en/using-matchers) and existing test cases for how to write new test specs. Here are some additional guidelines:
97+
98+
Use the minimal API needed for a test case. For example, if a test can be written without involving the reactivity system ra component, it should be written so. This limits the test's exposure to changes in unrelated parts and makes it more stable.
5099

51-
### Commonly used NPM scripts
100+
## Financial Contribution
52101

53-
# lint source codes
54-
$ npm run lint
102+
As a pure community-driven project without major corporate backing, we also welcome financial contributions via GitHub Sponsors and Patreon
55103

56-
# run the full test suite, include linting
57-
$ npm test
104+
- [Become a backer or sponsor on GitHub Sponsors](https://github.com/sponsors/kazupon)
105+
- [Become a backer or sponsor on Patreon](https://www.patreon.com/evanyou)
58106

59-
There are some other scripts available in the `scripts` section of the `package.json` file.
107+
Funds donated via GitHub Sponsors and Patreon go to support kazuya kawaguchi full-time work on Intlify.
60108

61-
The default test script will do the following: lint with ESLint -> unit tests with coverage. **Please make sure to have this pass successfully before submitting a PR.** Although the same tests will be run against your PR on the CI server, it is better to have it working locally beforehand.
109+
## Credits
62110

111+
Thank you to all the people who have already contributed to Intlify project and my OSS work !

0 commit comments

Comments
 (0)