Skip to content

Commit f70b062

Browse files
authored
Merge branch 'master' into concepts-tweaking
2 parents dee23a9 + 496e4d4 commit f70b062

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1618
-478
lines changed

.proselintrc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"max_errors": 1000,
33
"checks": {
4-
"phrasal_adjectives.ly" : false,
5-
"preferred_form" : false,
6-
"symbols.curly_quotes" : false,
4+
"phrasal_adjectives.ly" : false,
5+
"preferred_forms" : false,
76
"airlinese.misc" : true,
87
"annotations.misc" : false,
98
"archaism.misc" : true,
@@ -18,7 +17,7 @@
1817
"dates_times.am_pm" : true,
1918
"dates_times.dates" : true,
2019
"hedging.misc" : true,
21-
"hyperbole.misc" : true,
20+
"hyperbole.misc" : false,
2221
"jargon.misc" : true,
2322
"lexical_illusions.misc" : true,
2423
"links.broken" : false,
@@ -42,8 +41,8 @@
4241
"misc.metadiscourse" : true,
4342
"misc.narcissism" : true,
4443
"misc.not_guilty" : true,
45-
"misc.phrasal_adjectives" : true,
46-
"misc.preferred_forms" : true,
44+
"misc.phrasal_adjectives" : false,
45+
"misc.preferred_forms" : false,
4746
"misc.pretension" : true,
4847
"misc.professions" : true,
4948
"misc.punctuation" : true,
@@ -76,8 +75,8 @@
7675
"terms.eponymous_adjectives" : true,
7776
"terms.venery" : true,
7877
"typography.diacritical_marks" : true,
79-
"typography.exclamation" : true,
80-
"typography.symbols" : true,
78+
"typography.exclamation" : false,
79+
"typography.symbols" : false,
8180
"uncomparables.misc" : true,
8281
"weasel_words.misc" : true,
8382
"weasel_words.very" : true

CONTRIBUTING.md

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ From adding an issue for a documentation suggestion to creating a pull request:
44

55
## Setup
66

7-
* Install [Node.js](https://nodejs.org/) if you have not already.
8-
*Note: Node 6 or greater may be required for "best results".*
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!
99
* Fork the **webpack.js.org** repo at [https://github.com/webpack/webpack.js.org](https://github.com/webpack/webpack.js.org).
1010
* `git clone <your-clone-url> && cd webpack.js.org`
11-
* `git checkout develop`
1211
* `npm install`
1312
* `npm run build`
1413
* `npm start`
@@ -22,55 +21,26 @@ Run `git config user.email` to see your Git email, and verify it with [your GitH
2221

2322
## Editor Config
2423

25-
The [.editorconfig](https://github.com/webpack/webpack.js.org/blob/develop/.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.
26-
27-
## Git Flow
28-
29-
We are using the [git flow](http://nvie.com/posts/a-successful-git-branching-model/) branching model. Please direct all pull requests to the [develop](https://github.com/webpack/webpack.js.org/tree/develop) branch.
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.
3025

3126
## Branching Your Changes
3227

33-
Making a branch in your fork for your contribution is helpful in the following ways:
28+
Making a branch in your fork for your contribution is helpful in the following ways:
3429

3530
* It allows you to have multiple contributions in as PRs at once.
3631
* It allows us to identify what your contribution is about from the branch name.
3732

38-
You will want to checkout the `develop` branch locally before creating your new branch.
39-
40-
There are two types of branches:
41-
42-
* Feature
43-
* Hotfix
44-
45-
### Features
46-
47-
If your contribution is something new, like a new section or page or a new chunk to an existing page, you can create a branch with the following naming convention:
48-
49-
`feature/<the-new-feature>`
50-
51-
So, for example, if you are adding a page on how to write a custom loader your branch could have the name:
52-
53-
`feature/add-custom-loaders-page`
54-
55-
### Fixes
56-
57-
If you are fixing existing content or code you can create a branch with the following naming convention:
58-
59-
`hotfix/<the-fix>`
60-
61-
So, for example, if you are fixing spelling on the api configuration page for an option, your branch could have the name:
62-
63-
`hotfix/fix-option-property-spelling-on-api-configuration`
64-
6533
## Submitting Changes
6634

6735
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.
6836

69-
Issue the PR to the [develop](https://github.com/webpack/webpack.js.org/tree/develop) branch.
37+
Issue the PR to the [master](https://github.com/webpack/webpack.js.org/tree/master) branch.
38+
39+
> See [GitHub documentation](https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/) for more help.
7040
7141
## Contribution Recognition
7242

73-
Any document that you edit, you can choose to add your Github username at the top of the document for recognition:
43+
Any document that you edit, you can choose to add your GitHub username at the top of the document for recognition:
7444

7545
**example.md**
7646

@@ -80,7 +50,7 @@ title: Some Example Page
8050
contributors:
8151
- TheLarkInn
8252
- Sokra
83-
- Bebraw
53+
- bebraw
8454
- Jhnns
8555
- SpaceK33z
8656
===
@@ -89,7 +59,7 @@ contributors:
8959

9060
```
9161

92-
This will add your name and Github profile photo to the document in production. This is a great way to own the awesome work that you do and encourage that you remember to do this in your PR's.
62+
This will add your name and GitHub profile photo to the document in production. This is a great way to own the awesome work that you do and encourage that you remember to do this in your PR's.
9363

9464

9565
## Thank you

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ To develop, please pull the project, `cd` into the directory and run:
1212
- `npm run build` to create a production version of the site.
1313
- `npm start` to develop on a local webpack-dev-server (should be [here](http://localhost:3000/)).
1414

15-
If you want to fetch data for `/loaders` and `/plugins` pages, run `npm run fetch`.
15+
If you want to fetch the documentation on additional loaders/plugins hosted in [separate repositories](https://github.com/webpack), run `npm run fetch`.
1616

17-
For more information see the [contributors page](https://github.com/webpack/webpack.js.org/blob/develop/CONTRIBUTING.md)
17+
For more information see the [contributors page](https://github.com/webpack/webpack.js.org/blob/master/CONTRIBUTING.md)
1818

1919
## Content Progress
2020

2121
Check out the [MVP Milestone](https://github.com/webpack/webpack.js.org/milestones) for the current status.
22+
23+
## License
24+
25+
The content is available under [Creative Commons BY 4.0](https://creativecommons.org/licenses/by/4.0/) license.

antwar.config.js

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,22 +107,34 @@ module.exports = {
107107
loaders: section(
108108
'Loaders',
109109
function() {
110-
return require.context(
110+
const content = require.context(
111+
'json-loader!yaml-frontmatter-loader!./content/loaders',
112+
false,
113+
/^\.\/.*\.md$/
114+
);
115+
const generated = require.context(
111116
'json-loader!yaml-frontmatter-loader!./generated/loaders',
112117
false,
113118
/^\.\/.*\.md$/
114119
);
120+
return combineContexts(content, generated);
115121
}
116122
),
117123

118124
plugins: section(
119125
'Plugins',
120126
function() {
121-
return require.context(
127+
const content = require.context(
128+
'json-loader!yaml-frontmatter-loader!./content/plugins',
129+
false,
130+
/^\.\/.*\.md$/
131+
);
132+
const generated = require.context(
122133
'json-loader!yaml-frontmatter-loader!./generated/plugins',
123134
false,
124135
/^\.\/.*\.md$/
125136
);
137+
return combineContexts(content, generated);
126138
}
127139
),
128140

@@ -209,3 +221,19 @@ function processPage() {
209221
}
210222
};
211223
}
224+
225+
function combineContexts(context1, context2) {
226+
function webpackContext(req) {
227+
try {
228+
return context1(req);
229+
} catch (e) {
230+
return context2(req);
231+
}
232+
}
233+
webpackContext.keys = () => {
234+
let keys1 = context1.keys();
235+
let keys2 = context2.keys();
236+
return _.chain(keys1).concat(keys2).uniq().value();
237+
};
238+
return webpackContext;
239+
}

bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const antwar = require('antwar');
22

3-
const environment = process.env.npm_lifecycle_event;
3+
const environment = process.env.npm_lifecycle_event || 'build';
44

55
// Patch Babel env to make HMR switch work
66
process.env.BABEL_ENV = environment;

components/cc/cc-style.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.footer__license {
2+
display:inline-block;
3+
height:35px;
4+
margin-left: 1em;
5+
margin-right: 1em;
6+
7+
img {
8+
width:auto;
9+
height:100%;
10+
}
11+
}

components/cc/cc.jsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from 'react';
2+
import Link from '../link/link';
3+
import './cc-style.scss';
4+
5+
const CC = () => {
6+
return (
7+
<Link to="https://creativecommons.org/licenses/by/4.0/" className="footer__license">
8+
<img
9+
alt="Creative Commons License"
10+
src="https://i.creativecommons.org/l/by/4.0/88x31.png"
11+
/>
12+
</Link>
13+
);
14+
};
15+
16+
export default CC;

components/footer/footer-style.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
}
5656

5757
.footer__icon {
58-
display:block;
58+
display:inline-block;
5959
height:35px;
6060

61-
img {
61+
img {
6262
width:auto;
63-
height:100%;
63+
height:100%;
6464
}
6565
}
6666

components/footer/footer.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import CC from '../cc/cc';
23
import Link from '../link/link';
34
import Container from '../container/container';
45
import Icon from '../../assets/icon-square-small.svg';
@@ -26,6 +27,7 @@ export default (props) => {
2627
<Link className="footer__link" to="//gitter.im/webpack/webpack">Support</Link>
2728
<Link className="footer__link" to="https://github.com/webpack/webpack/releases">Changelog</Link>
2829
<Link className="footer__link" to="/license">License</Link>
30+
<CC />
2931
</section>
3032
</Container>
3133
</div>

components/page/page.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import Sidecar from '../sidecar/sidecar';
66
import Contributors from '../contributors/contributors';
77
import './page-style';
88
import '../sidebar/sidebar-style';
9+
import { trimEnd } from 'lodash';
910

1011
export default ({ section, page }) => {
11-
let edit = `https://github.com/webpack/webpack.js.org/edit/develop/content/${page.url}.md`;
12+
let edit = page.edit || `https://github.com/webpack/webpack.js.org/edit/master/content/${trimEnd(page.url, '/')}${page.type === 'index' ? '/index' : ''}.md`;
1213

1314
return (
1415
<Container className="page">

0 commit comments

Comments
 (0)