Skip to content

Commit

Permalink
Merge pull request docschina#367 from dear-lizhihua/cn
Browse files Browse the repository at this point in the history
update master
  • Loading branch information
dear-lizhihua authored Aug 29, 2017
2 parents 5b48630 + 77e7f8f commit 12420d1
Show file tree
Hide file tree
Showing 238 changed files with 1,139 additions and 426 deletions.
25 changes: 15 additions & 10 deletions .alexrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,28 @@
"allow": [
"bigger",
"color",
"lies",
"colors",
"crash",
"dead",
"dive",
"execute",
"executed",
"execution",
"host-hostess",
"dirty",
"disabled",
"crash",
"failed",
"failure",
"period",
"fire",
"hook",
"dirty",
"host-hostess",
"fire",
"remains",
"hosts",
"jade",
"failed",
"white",
"colors"
"laid",
"lies",
"period",
"pros",
"reject",
"remains",
"white"
]
}
10 changes: 10 additions & 0 deletions .github/CODE_OF_CONDUCT.md
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
114 changes: 86 additions & 28 deletions .github/CONTRIBUTING.md
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
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE.md
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.__
14 changes: 10 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
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/
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ node_modules
npm-debug.log
build
generated
components/support/support-backers.json
components/support/support-sponsors.json
components/starter-kits/starter-kits-data.json
src/components/Support/support-backers.json
src/components/Support/support-sponsors.json
src/components/StarterKits/starter-kits-data.json
.antwar
.idea
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ language: node_js
node_js:
- "6"
script:
- bash ./scripts/deploy.sh
- bash ./src/scripts/deploy.sh
sudo: required
install:
- npm install --global yarn
Expand Down
55 changes: 39 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

[![Travis](https://img.shields.io/travis/webpack-china/webpack.js.org.svg)](https://travis-ci.org/webpack-china/webpack.js.org)

> https://doc.webpack-china.org webpack 中文文档
> https://doc.webpack-china.org webpack 中文文档
> https://webpack-china.org webpack 中文社区

### 中文站点
[英文站点](https://webpack.js.org/)是由 CI 自动构建并部署到 gh-pages 分支。
[英文站点](https://webpack.js.org/)是由 CI 自动构建并部署到 gh-pages 分支。
[中文站点](https://doc.webpack-china.org/)是由 CI 自动构建并部署到 gh-pages 分支。

### 仓库一共有三个(以下全部简称为英文仓库、中文仓库、我的仓库):
[英文仓库(webpack/webpack.js.org)](https://github.com/webpack/webpack.js.org)
[中文仓库(webpack-china/webpack.js.org - fork webpack/webpack.js.org)](https://github.com/webpack-china/webpack.js.org)
[英文仓库(webpack/webpack.js.org)](https://github.com/webpack/webpack.js.org)
[中文仓库(webpack-china/webpack.js.org - fork webpack/webpack.js.org)](https://github.com/webpack-china/webpack.js.org)
[我的仓库(dear-lizhihua/webpack.js.org - fork webpack-china/webpack.js.org)](https://github.com/dear-lizhihua/webpack.js.org)

### 合并上游更新的方案说明
Expand All @@ -38,27 +38,50 @@



If you want to fetch the documentation on additional loaders/plugins hosted in [separate repositories](https://github.com/webpack), run `npm run fetch`. The script will help you download those documentations and put them under `content/loaders` or `content/plugins` folder.
# webpack.js.org

For more information see the [contributors page](https://github.com/webpack/webpack.js.org/blob/master/.github/CONTRIBUTING.md)
[![build status](https://secure.travis-ci.org/webpack/webpack.js.org.svg)](http://travis-ci.org/webpack/webpack.js.org)
[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)

## Translation Guide
Guides, documentation, and all things webpack.

* Fork `translation` branch and create a new branch, for example, `cn`, `german`, etc.
* Translate documentation.
* If you have permission to access `translation` branch, run `npm run fetch` to update `loaders` and `plugins` documentation regularly.
* Regularly merge from `translation` branch to your own `translation` branch in order to get the updated documentation (especially plugin and loader documentation). Then you can compare the new and the old content.
* Use [travis-ci](https://travis-ci.org) and github webhook to deploy the documentation automatically. Please refer to this article, [Deploy Using Travis-CI And Github Webhook](https://medium.com/@lcxfs1991/deploy-using-travis-ci-and-github-webhook-eba67b3ab6ac)
* Any questions, please open and issue and @lcxfs1991 or @dear-lizhihua.

## Content Progress

Check out the [MVP Milestone](https://github.com/webpack/webpack.js.org/milestones) for the current status.
Now that we've covered much of the backlog of _missing documentation_, we are starting
to heavily review each section of the site's content to sort and structure it appropriately.
The following issues should provide a pretty good idea of where things are, and where
they are going:

- [Guides - Review and Simplify][1]
- [Concepts - Review, Organize, Define Clear Goals][2]

We haven't created issues for the other sections yet but they will be coming soon. For
dev-related work please see [General - Current Longterm Plan][3], which will soon be
replaced by a more dev-specific issue.


## Translation

If you hope to localize this documentation please transit to [translate branch](https://github.com/webpack/webpack.js.org/tree/translation).
If you hope to localize this documentation please jump to the [translate branch][4].


## Contributing

Read throug the [writer's guide][7] if you're interested in editing the conent on this
site. See the [contributors page][5] to learn how to set up and start working on the site
locally.


## License

The content is available under [Creative Commons BY 4.0](https://creativecommons.org/licenses/by/4.0/) license.
The content is available under the [Creative Commons BY 4.0][6] license.


[1]: https://github.com/webpack/webpack.js.org/issues/1258
[2]: https://github.com/webpack/webpack.js.org/issues/1386
[3]: https://github.com/webpack/webpack.js.org/issues/1380
[4]: https://github.com/webpack/webpack.js.org/tree/translation
[5]: https://github.com/webpack/webpack.js.org/blob/master/.github/CONTRIBUTING.md
[6]: https://creativecommons.org/licenses/by/4.0/
[7]: https://webpack.js.org/writers-guide
Loading

0 comments on commit 12420d1

Please sign in to comment.