forked from docschina/webpack.js.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request docschina#367 from dear-lizhihua/cn
update master
- Loading branch information
Showing
238 changed files
with
1,139 additions
and
426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Code of Conduct | ||
--------------- | ||
|
||
At webpack and all webpack/webpack-contrib repositories we follow the | ||
[JSFoundation Code of Conduct][1]. Please adhere to the guidelines there and | ||
feel free to report any violation of them to the @webpack/core-team, | ||
@webpack/documentation-team, or <[email protected]>. | ||
|
||
|
||
[1]: https://js.foundation/community/code-of-conduct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,125 @@ | ||
# Contributing | ||
Contributing | ||
------------ | ||
|
||
From adding an issue for a documentation suggestion to creating a pull request: every | ||
contribution is appreciated and welcome. If you're planning to implement a new section or | ||
page please create an issue first. | ||
|
||
From adding an issue for a documentation suggestion to creating a pull request: every contribution is appreciated and welcome. If you're planning to implement a new section or page please create an issue first. | ||
|
||
## Setup | ||
|
||
* Install [Node.js](https://nodejs.org/) if you have not already. | ||
*Note: Node 6.9.* is required for "best results".*. Node 7 may have issues! | ||
* Fork the **webpack.js.org** repo at [https://github.com/webpack/webpack.js.org](https://github.com/webpack/webpack.js.org). | ||
* `git clone <your-clone-url> && cd webpack.js.org` | ||
* `npm install` | ||
* `npm run build` | ||
* `npm start` | ||
* Visit [http://localhost:3000](http://localhost:3000) to preview your changes before making a pull request. | ||
Start by ensuring you have Node installed and forking the repository: | ||
|
||
- Install [Node.js][1] if you have not already. | ||
- Fork the **webpack.js.org** repo from [the main repository][2]. | ||
- `git clone <your-clone-url> && cd webpack.js.org` | ||
|
||
Once you are in the project directory, run the following commands: | ||
|
||
- `npm install` to pull all dependencies. | ||
- `npm run build` to create a production version of the site. | ||
- `npm start` to develop on a local webpack-dev-server: [localhost:3000][3]. | ||
- `npm run fetch` to retrieve external documentation/data. | ||
|
||
The final command, `npm run fetch`, is optional as both `npm run build` and `npm start` | ||
will do this automatically. This step pulls in documentation for loaders/plugins hosted | ||
in separate repositories such as the ones found in the [webpack-contrib][4] organization. | ||
See the `package.json` for the full list of `scripts`. | ||
|
||
> Note that __Node 6.9.x__ or above is required for the build process to run properly. | ||
> Note that a __Python version between v2.5.0 and 3.0.0__ is required for the [proselint][12] dependency. | ||
|
||
## Contributor License Agreement | ||
|
||
When submitting your contribution, a CLA (Contributor License Agreement) bot will come by to verify that you signed the CLA. If it is your first time, it will link you to the right place to sign it. However, if you have committed your contributions using an email that is not the same as your email used on GitHub, the CLA bot can't accept your contribution. | ||
When submitting your contribution, a CLA (Contributor License Agreement) bot will come by | ||
to verify that you signed the CLA. If it is your first time, it will link you to the right | ||
place to sign it. However, if you have committed your contributions using an email that is | ||
not the same as your email used on GitHub, the CLA bot can't accept your contribution. | ||
|
||
Run `git config user.email` to see your Git email, and verify it with your [GitHub email][5]. | ||
|
||
Run `git config user.email` to see your Git email, and verify it with [your GitHub email](https://github.com/settings/emails). | ||
|
||
## Editor Config | ||
|
||
The [.editorconfig](https://github.com/webpack/webpack.js.org/blob/master/.editorconfig) in the root should ensure consistent formatting. Please make sure you've [installed the plugin](http://editorconfig.org/#download) if your text editor needs one. | ||
The [.editorconfig][6] in the root should ensure consistent formatting. Please make sure | ||
you've [installed the plugin][7] if your text editor needs one. | ||
|
||
|
||
## Branching Your Changes | ||
|
||
Making a branch in your fork for your contribution is helpful in the following ways: | ||
|
||
* It allows you to have multiple contributions in as PRs at once. | ||
* It allows us to identify what your contribution is about from the branch name. | ||
- It allows you to have multiple contributions in as PRs at once. | ||
- It allows us to identify what your contribution is about from the branch name. | ||
|
||
|
||
## Committing Your Changes | ||
|
||
Please follow the [conventionalcommits][10] specification. For example, for documentation | ||
changes, a short commit message may resemble the following: | ||
|
||
``` md | ||
docs(config): clarify `output.filename` usage | ||
``` | ||
|
||
Note that you can add a body/footer if more details are necessary. Soon we will | ||
start utilizing [`standard-version`][11] for releases/changelog generation. This | ||
will also potentially tie in to having archived docs for each major version. | ||
|
||
|
||
## Submitting Changes | ||
|
||
After getting some feedback, push to your fork branch and submit a pull request. We may suggest some changes or improvements or alternatives, but for small changes your pull request should be accepted quickly. | ||
After getting some feedback, push to your fork branch and submit a pull request. We may | ||
suggest some changes or improvements or alternatives, but for small changes your pull | ||
request should be accepted and merged fairly quick. | ||
|
||
Issue the PR to the [master][8] branch. | ||
|
||
Issue the PR to the [master](https://github.com/webpack/webpack.js.org/tree/master) branch. | ||
> See [GitHub documentation][9] for more help. | ||
> See [GitHub documentation](https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/) for more help. | ||
|
||
## Contribution Recognition | ||
## Recognition | ||
|
||
You can choose to add your GitHub username for recognition at the top of any markdown document you edit: | ||
You can choose to add your GitHub username for recognition at the top of any markdown | ||
document you edit: | ||
|
||
**example.md** | ||
__example.md__ | ||
|
||
```markdown | ||
=== | ||
--- | ||
title: Some Example Page | ||
contributors: | ||
- TheLarkInn | ||
- Sokra | ||
- bebraw | ||
- Jhnns | ||
- SpaceK33z | ||
=== | ||
|
||
## Some Documentation | ||
--- | ||
|
||
Some documentation... | ||
``` | ||
|
||
This will add your name and GitHub profile photo to the document in production. It's a great way to own the awesome work that you do and we encourage you to do this in your PRs. | ||
This will add your name and GitHub profile photo to the document in production. It's a | ||
great way to own the awesome work that you do and we encourage you to do this in your PRs. | ||
|
||
|
||
## Thank You | ||
|
||
webpack is a feature rich, low level tool and documentation is a huge time sink. We appreciate | ||
any time spent fixing typos or clarifying sections in the documentation. | ||
|
||
## Thank you | ||
|
||
webpack is insanely feature rich and documentation is a huge time sink. We greatly appreciate any time spent fixing typos or clarifying sections in the documentation. | ||
[1]: https://nodejs.org/ | ||
[2]: https://github.com/webpack/webpack.js.org | ||
[3]: http://localhost:3000/ | ||
[4]: https://github.com/webpack-contrib | ||
[5]: https://github.com/settings/emails | ||
[6]: https://github.com/webpack/webpack.js.org/blob/master/.editorconfig | ||
[7]: http://editorconfig.org/#download | ||
[8]: https://github.com/webpack/webpack.js.org/tree/master | ||
[9]: https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/ | ||
[10]: http://conventionalcommits.org/ | ||
[11]: https://github.com/conventional-changelog/standard-version | ||
[12]: https://github.com/amperser/proselint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
1. Check the existing issues to see if you can find something matching to your request. | ||
2. If you didn't find a relevant issue, go ahead and open a new one. It's better to make small typo fixes and such directly as pull requests. | ||
- [ ] Check the current issues to ensure you aren't creating a duplicate. | ||
- [ ] Consider making small typo fixes and such directly as pull requests. | ||
- [ ] No existing issue? Go ahead and open a new one. | ||
- __Remove these instructions from your PR as they are for your eyes only.__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
1. [Read and sign the CLA](https://cla.js.foundation/webpack/webpack.js.org). This needs to be done only once. PRs that haven't signed it won't be accepted. | ||
2. Make sure your PR complies with [the writer's guide](https://webpack.js.org/writers-guide/). | ||
3. Read through the PR diff carefully as sometimes this can reveal issues. The work will be reviewed, but this can save some effort. | ||
4. Remove these instructions from your PR as they are for your eyes only. | ||
_describe your changes..._ | ||
|
||
- [ ] Read and sign the [CLA][1]. PRs that haven't signed it won't be accepted. | ||
- [ ] Make sure your PR complies with the [writer's guide][2]. | ||
- [ ] Review the diff carefully as sometimes this can reveal issues. | ||
- __Remove these instructions from your PR as they are for your eyes only.__ | ||
|
||
|
||
[1]: https://cla.js.foundation/webpack/webpack.js.org | ||
[2]: https://webpack.js.org/writers-guide/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.