|
1 |
| -# Contributing |
| 1 | +Contributing |
| 2 | +------------ |
| 3 | + |
| 4 | +From adding an issue for a documentation suggestion to creating a pull request: every |
| 5 | +contribution is appreciated and welcome. If you're planning to implement a new section or |
| 6 | +page please create an issue first. |
2 | 7 |
|
3 |
| -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. |
4 | 8 |
|
5 | 9 | ## Setup
|
6 | 10 |
|
7 |
| -* Install [Node.js](https://nodejs.org/) if you have not already. |
8 |
| - *Note: Node 6.9.* is required for "best results".*. Node 7 may have issues! |
9 |
| -* Fork the **webpack.js.org** repo at [https://github.com/webpack/webpack.js.org](https://github.com/webpack/webpack.js.org). |
10 |
| -* `git clone <your-clone-url> && cd webpack.js.org` |
11 |
| -* `npm install` |
12 |
| -* `npm run build` |
13 |
| -* `npm start` |
14 |
| -* Visit [http://localhost:3000](http://localhost:3000) to preview your changes before making a pull request. |
| 11 | +Start by ensuring you have Node installed and forking the repository: |
| 12 | + |
| 13 | +- Install [Node.js][1] if you have not already. |
| 14 | +- Fork the **webpack.js.org** repo from [the main repository][2]. |
| 15 | +- `git clone <your-clone-url> && cd webpack.js.org` |
| 16 | + |
| 17 | +Once you are in the project directory, run the following commands: |
| 18 | + |
| 19 | +- `npm install` to pull all dependencies. |
| 20 | +- `npm run build` to create a production version of the site. |
| 21 | +- `npm start` to develop on a local webpack-dev-server: [localhost:3000][3]. |
| 22 | +- `npm run fetch` to retrieve external documentation/data. |
| 23 | + |
| 24 | +The final command, `npm run fetch`, is optional as both `npm run build` and `npm start` |
| 25 | +will do this automatically. This step pulls in documentation for loaders/plugins hosted |
| 26 | +in separate repositories such as the ones found in the [webpack-contrib][4] organization. |
| 27 | +See the `package.json` for the full list of `scripts`. |
| 28 | + |
| 29 | +> Note that __Node 6.9.x__ or above is required for the build process to run properly. |
| 30 | +
|
15 | 31 |
|
16 | 32 | ## Contributor License Agreement
|
17 | 33 |
|
18 |
| -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. |
| 34 | +When submitting your contribution, a CLA (Contributor License Agreement) bot will come by |
| 35 | +to verify that you signed the CLA. If it is your first time, it will link you to the right |
| 36 | +place to sign it. However, if you have committed your contributions using an email that is |
| 37 | +not the same as your email used on GitHub, the CLA bot can't accept your contribution. |
| 38 | + |
| 39 | +Run `git config user.email` to see your Git email, and verify it with your [GitHub email][5]. |
19 | 40 |
|
20 |
| -Run `git config user.email` to see your Git email, and verify it with [your GitHub email](https://github.com/settings/emails). |
21 | 41 |
|
22 | 42 | ## Editor Config
|
23 | 43 |
|
24 |
| -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. |
| 44 | +The [.editorconfig][6] in the root should ensure consistent formatting. Please make sure |
| 45 | +you've [installed the plugin][7] if your text editor needs one. |
| 46 | + |
25 | 47 |
|
26 | 48 | ## Branching Your Changes
|
27 | 49 |
|
28 | 50 | Making a branch in your fork for your contribution is helpful in the following ways:
|
29 | 51 |
|
30 |
| -* It allows you to have multiple contributions in as PRs at once. |
31 |
| -* It allows us to identify what your contribution is about from the branch name. |
| 52 | +- It allows you to have multiple contributions in as PRs at once. |
| 53 | +- It allows us to identify what your contribution is about from the branch name. |
| 54 | + |
| 55 | + |
| 56 | +## Committing Your Changes |
| 57 | + |
| 58 | +Please follow the [conventionalcommits][10] specification. For example, for documentation |
| 59 | +changes, a short commit message may resemble the following: |
| 60 | + |
| 61 | +``` md |
| 62 | +docs(config): clarify `output.filename` usage |
| 63 | +``` |
| 64 | + |
| 65 | +Note that you can add a body/footer if more details are necessary. Soon we will |
| 66 | +start utilizing [`standard-version`][11] for releases/changelog generation. This |
| 67 | +will also potentially tie in to having archived docs for each major version. |
| 68 | + |
32 | 69 |
|
33 | 70 | ## Submitting Changes
|
34 | 71 |
|
35 |
| -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. |
| 72 | +After getting some feedback, push to your fork branch and submit a pull request. We may |
| 73 | +suggest some changes or improvements or alternatives, but for small changes your pull |
| 74 | +request should be accepted and merged fairly quick. |
| 75 | + |
| 76 | +Issue the PR to the [master][8] branch. |
36 | 77 |
|
37 |
| -Issue the PR to the [master](https://github.com/webpack/webpack.js.org/tree/master) branch. |
| 78 | +> See [GitHub documentation][9] for more help. |
38 | 79 |
|
39 |
| -> See [GitHub documentation](https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/) for more help. |
40 | 80 |
|
41 |
| -## Contribution Recognition |
| 81 | +## Recognition |
42 | 82 |
|
43 |
| -You can choose to add your GitHub username for recognition at the top of any markdown document you edit: |
| 83 | +You can choose to add your GitHub username for recognition at the top of any markdown |
| 84 | +document you edit: |
44 | 85 |
|
45 |
| -**example.md** |
| 86 | +__example.md__ |
46 | 87 |
|
47 | 88 | ```markdown
|
48 |
| -=== |
| 89 | +--- |
49 | 90 | title: Some Example Page
|
50 | 91 | contributors:
|
51 | 92 | - TheLarkInn
|
52 | 93 | - Sokra
|
53 | 94 | - bebraw
|
54 | 95 | - Jhnns
|
55 | 96 | - SpaceK33z
|
56 |
| -=== |
57 |
| - |
58 |
| -## Some Documentation |
| 97 | +--- |
59 | 98 |
|
| 99 | +Some documentation... |
60 | 100 | ```
|
61 | 101 |
|
62 |
| -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. |
| 102 | +This will add your name and GitHub profile photo to the document in production. It's a |
| 103 | +great way to own the awesome work that you do and we encourage you to do this in your PRs. |
| 104 | + |
| 105 | + |
| 106 | +## Thank You |
63 | 107 |
|
| 108 | +webpack is a feature rich, low level tool and documentation is a huge time sink. We appreciate |
| 109 | +any time spent fixing typos or clarifying sections in the documentation. |
64 | 110 |
|
65 |
| -## Thank you |
66 | 111 |
|
67 |
| -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. |
| 112 | +[1]: https://nodejs.org/ |
| 113 | +[2]: https://github.com/webpack/webpack.js.org |
| 114 | +[3]: http://localhost:3000/ |
| 115 | +[4]: https://github.com/webpack-contrib |
| 116 | +[5]: https://github.com/settings/emails |
| 117 | +[6]: https://github.com/webpack/webpack.js.org/blob/master/.editorconfig |
| 118 | +[7]: http://editorconfig.org/#download |
| 119 | +[8]: https://github.com/webpack/webpack.js.org/tree/master |
| 120 | +[9]: https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/ |
| 121 | +[10]: http://conventionalcommits.org/ |
| 122 | +[11]: https://github.com/conventional-changelog/standard-version |
0 commit comments