Skip to content

merge from master #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Apr 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4e3ede8
Clarify output.strictModuleExceptionHandling
simon04 Apr 15, 2017
b139fbb
Update output.md
lemmingworks Apr 16, 2017
f8877f3
Merge pull request #1116 from lemmingworks/master
simon04 Apr 16, 2017
63551cc
Add Translation part in Readme (#1115)
lcxfs1991 Apr 16, 2017
a7a54a5
Compiler event hook is `failed`, not `fail`.
sompylasar Apr 17, 2017
b8e4164
Merge pull request #1118 from sompylasar/patch-1
simon04 Apr 17, 2017
92db973
Update index.md
xdamman Apr 17, 2017
f682226
Clarify help on documentation
simon04 Apr 17, 2017
c59f44c
Merge pull request #1119 from xdamman/patch-1
simon04 Apr 17, 2017
ab2a604
Fix Testing/Linting Issues (#1112)
skipjack Apr 18, 2017
0a23aa3
remove useless env param
davidctj Apr 18, 2017
307a283
Merge pull request #1120 from davidctj/patch-2
simon04 Apr 18, 2017
9de5fd8
code-splitting: add new webpack 2.4.0 features
simon04 Apr 15, 2017
a8f7171
Merge pull request #1113 from simon04/issue-796
simon04 Apr 18, 2017
ebcd766
package.json: Remove obsolete dependencies
simon04 Apr 18, 2017
7485ce4
Merge pull request #1111 from simon04/code-splitting-2.4.0
simon04 Apr 19, 2017
d2f2448
Document new options in webpack 2.3.0
simon04 Apr 14, 2017
f405445
Merge pull request #1108 from simon04/webpack-2.3.0
simon04 Apr 19, 2017
0366064
Sidebar: show vertical bar for items w/o anchors
simon04 Apr 19, 2017
9e05c7a
instructions to install css-loader in "Code Splitting - CSS"
TomTasche Apr 19, 2017
ef5d784
Merge pull request #1125 from simon04/vertical-bar
skipjack Apr 19, 2017
1c86086
Merge pull request #1130 from TomTasche/patch-1
simon04 Apr 19, 2017
a37f5d2
Consistent `npm install --save-dev`
simon04 Apr 19, 2017
f5d77d9
Merge pull request #1132 from simon04/npm-install
simon04 Apr 19, 2017
701bed9
Rename to .markdownlint.json
simon04 Apr 19, 2017
889f1da
Merge pull request #1134 from simon04/markdownlint-json
simon04 Apr 19, 2017
6c78d68
Merge pull request #1123 from simon04/rm-dependencies
skipjack Apr 20, 2017
672ef92
Create .github folder (#1137)
yeskunall Apr 20, 2017
7b3d784
Fixed spelling. (#1138)
cchamberlain Apr 21, 2017
9718983
add a missed callback (#1141)
jalkoby Apr 21, 2017
d5d3450
💄 Enforce newline at the end of each file. (#1139)
yeskunall Apr 21, 2017
5ebb244
Improve fetching of loader/plugin READMEs (#1117)
simon04 Apr 21, 2017
3941db1
add style-loader to tutorial "Code Splitting - CSS" (#1140)
TomTasche Apr 22, 2017
b3a81e7
docs(plugins): add `IgnorePlugin` documentation
simon04 Apr 23, 2017
50358c0
docs(plugins): add `NoEmitOnErrorsPlugin` documentation
simon04 Apr 23, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .alexrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
{
"allow": ["boogeyman-boogeywoman"]
"allow": [
"bigger",
"color",
"lies",
"execute",
"executed",
"execution",
"host-hostess",
"disabled",
"crash",
"failure",
"period",
"hook",
"dirty",
"host-hostess",
"fire",
"remains",
"jade",
"failed"
]
}
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ root = true
[*.{js}]
charset = utf-8

[*]
trim_trailing_whitespace = true
insert_final_newline = true

# 4 space indentation
[*.{md,js,jsx,scss,hbs}]
indent_style = space
indent_size = 2

# Format Config
[{package.json}]
[{package.json,.alexrc,babelrc,.eslintignore,.eslintrc,.markdownlint.json,.proselintrc}]
indent_style = space
indent_size = 2
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion .markdownlintrc → .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"default": true,
"MD002": false,
"MD007": { "indent": 4 },
"MD013": { "line_length": 500 },
"MD013": { "line_length": 600 },
"MD026": false,
"MD029": { "style": "ordered"},
"MD033": false,
"MD034": false,
Expand Down
164 changes: 82 additions & 82 deletions .proselintrc
Original file line number Diff line number Diff line change
@@ -1,84 +1,84 @@
{
"max_errors": 1000,
"checks": {
"phrasal_adjectives.ly" : false,
"preferred_forms" : false,
"airlinese.misc" : true,
"annotations.misc" : false,
"archaism.misc" : true,
"cliches.hell" : true,
"cliches.misc" : true,
"consistency.spacing" : true,
"consistency.spelling" : true,
"corporate_speak.misc" : true,
"cursing.filth" : true,
"cursing.nfl" : false,
"cursing.nword" : true,
"dates_times.am_pm" : true,
"dates_times.dates" : true,
"hedging.misc" : true,
"hyperbole.misc" : false,
"jargon.misc" : true,
"lexical_illusions.misc" : true,
"links.broken" : false,
"malapropisms.misc" : true,
"misc.apologizing" : true,
"misc.back_formations" : true,
"misc.bureaucratese" : true,
"misc.but" : false,
"misc.capitalization" : true,
"misc.chatspeak" : true,
"misc.commercialese" : true,
"misc.composition" : true,
"misc.currency" : true,
"misc.debased" : true,
"misc.false_plurals" : true,
"misc.illogic" : true,
"misc.inferior_superior" : true,
"misc.latin" : true,
"misc.many_a" : true,
"misc.metaconcepts" : true,
"misc.metadiscourse" : true,
"misc.narcissism" : true,
"misc.not_guilty" : true,
"misc.phrasal_adjectives" : false,
"misc.preferred_forms" : false,
"misc.pretension" : true,
"misc.professions" : true,
"misc.punctuation" : true,
"misc.scare_quotes" : true,
"misc.suddenly" : true,
"misc.tense_present" : true,
"misc.waxed" : true,
"misc.whence" : true,
"mixed_metaphors.misc" : true,
"mondegreens.misc" : true,
"needless_variants.misc" : true,
"nonwords.misc" : true,
"oxymorons.misc" : true,
"psychology.misc" : true,
"redundancy.misc" : true,
"redundancy.ras_syndrome" : true,
"skunked_terms.misc" : true,
"spelling.able_atable" : true,
"spelling.able_ible" : true,
"spelling.athletes" : true,
"spelling.em_im_en_in" : true,
"spelling.er_or" : true,
"spelling.in_un" : true,
"spelling.misc" : true,
"security.credit_card" : true,
"security.password" : true,
"sexism.misc" : true,
"terms.animal_adjectives" : true,
"terms.denizen_labels" : true,
"terms.eponymous_adjectives" : true,
"terms.venery" : true,
"typography.diacritical_marks" : true,
"typography.exclamation" : false,
"typography.symbols" : false,
"uncomparables.misc" : true,
"weasel_words.misc" : true,
"weasel_words.very" : true
}
"max_errors": 1000,
"checks": {
"phrasal_adjectives.ly" : false,
"preferred_forms" : false,
"airlinese.misc" : true,
"annotations.misc" : false,
"archaism.misc" : true,
"cliches.hell" : true,
"cliches.misc" : true,
"consistency.spacing" : true,
"consistency.spelling" : true,
"corporate_speak.misc" : true,
"cursing.filth" : true,
"cursing.nfl" : false,
"cursing.nword" : true,
"dates_times.am_pm" : true,
"dates_times.dates" : true,
"hedging.misc" : true,
"hyperbole.misc" : false,
"jargon.misc" : true,
"lexical_illusions.misc" : true,
"links.broken" : false,
"malapropisms.misc" : true,
"misc.apologizing" : true,
"misc.back_formations" : true,
"misc.bureaucratese" : true,
"misc.but" : false,
"misc.capitalization" : true,
"misc.chatspeak" : true,
"misc.commercialese" : true,
"misc.composition" : true,
"misc.currency" : true,
"misc.debased" : true,
"misc.false_plurals" : true,
"misc.illogic" : true,
"misc.inferior_superior" : true,
"misc.latin" : true,
"misc.many_a" : true,
"misc.metaconcepts" : true,
"misc.metadiscourse" : true,
"misc.narcissism" : true,
"misc.not_guilty" : true,
"misc.phrasal_adjectives" : false,
"misc.preferred_forms" : false,
"misc.pretension" : true,
"misc.professions" : true,
"misc.punctuation" : true,
"misc.scare_quotes" : true,
"misc.suddenly" : true,
"misc.tense_present" : true,
"misc.waxed" : true,
"misc.whence" : true,
"mixed_metaphors.misc" : true,
"mondegreens.misc" : true,
"needless_variants.misc" : true,
"nonwords.misc" : true,
"oxymorons.misc" : true,
"psychology.misc" : true,
"redundancy.misc" : true,
"redundancy.ras_syndrome" : true,
"skunked_terms.misc" : true,
"spelling.able_atable" : true,
"spelling.able_ible" : true,
"spelling.athletes" : true,
"spelling.em_im_en_in" : true,
"spelling.er_or" : true,
"spelling.in_un" : true,
"spelling.misc" : true,
"security.credit_card" : true,
"security.password" : true,
"sexism.misc" : true,
"terms.animal_adjectives" : true,
"terms.denizen_labels" : true,
"terms.eponymous_adjectives" : true,
"terms.venery" : true,
"typography.diacritical_marks" : true,
"typography.exclamation" : false,
"typography.symbols" : false,
"uncomparables.misc" : true,
"weasel_words.misc" : true,
"weasel_words.very" : true
}
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ script:
- bash ./scripts/deploy.sh
sudo: required
install:
- npm i yarn -g
- npm install --global yarn
- yarn
- sudo pip install proselint
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ For more information see the [contributors page](https://github.com/webpack/webp

Check out the [MVP Milestone](https://github.com/webpack/webpack.js.org/milestones) for the current status.

## Translation

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

## License

The content is available under [Creative Commons BY 4.0](https://creativecommons.org/licenses/by/4.0/) license.
6 changes: 6 additions & 0 deletions components/sidebar-item/sidebar-item-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,10 @@
transform: rotate(90deg);
}
}

&--disabled {
.sidebar-item__toggle {
color: #AAA;
}
}
}
7 changes: 5 additions & 2 deletions components/sidebar-item/sidebar-item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ export default class SidebarItem extends React.Component {
render() {
let { title, anchors = [] } = this.props;
let openMod = this.state.open ? `${block}--open` : '';
let disabledMod = anchors.length == 0 ? `${block}--disabled` : '';

return (
<div className={ `${block} ${openMod}` }>
<div className={ `${block} ${openMod} ${disabledMod}` }>
{ anchors.length > 0 ? (
<i
className={ `${block}__toggle icon-chevron-right` }
onClick={ this._toggle.bind(this) } />
) : null }
) : <i
className={ `${block}__toggle icon-vertical-bar` } />
}

<Link
className={ `${block}__title` }
Expand Down
22 changes: 19 additions & 3 deletions content/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
title: Command Line Interface (CLI)
sort: 2
contributors:
- ev1stensberg
- simon04
- ev1stensberg
- simon04
---

webpack provides a Command Line Interface (CLI) to configure and interact with your build. This is mostly useful in case of early prototyping, profiling, writing npm scripts or personal customization of the build.
Expand All @@ -14,14 +14,18 @@ Have a look at the [installation guide](/guides/installation) unless you have we

T> The new CLI for webpack is under development. New features are being added such as the `--init` flag. [Check it out!](https://github.com/webpack/webpack-cli)


## Usage with config file

```sh
webpack [--config webpack.config.js]
```

See [configuration](/configuration) for the options in the configuration file.


## Usage without config file

```sh
webpack <entry> [<entry>] <output>
```
Expand Down Expand Up @@ -77,6 +81,7 @@ This will form the bundle with both the files as separate entry points.
[1] ./src/others.js 29 bytes {0} {1} [built]
```


### Common Options

**List all of the options available on the cli**
Expand Down Expand Up @@ -115,13 +120,15 @@ In every other case, webpack prints out a set of stats showing bundle, chunk and
This response is accepted by webpack's [analyse tool](https://webpack.github.com/analyse), or chrisbateman's [webpack-visualizer](https://chrisbateman.github.io/webpack-visualizer/), or th0r's [webpack-bundle-analyzer](https://github.com/th0r/webpack-bundle-analyzer).
The analyse tool will take in the JSON and provide all the details of the build in graphical form.

*Further reads:*
*Further reading:*

* [Analyzing Build Statistics](https://survivejs.com/webpack/optimizing-build/analyzing-build-statistics/)
* [Three simple ways to inspect a webpack bundle](https://medium.com/@joeclever/three-simple-ways-to-inspect-a-webpack-bundle-7f6a8fe7195d#.7d2i06mjx)
* [Optimising your application bundle size with webpack](https://hackernoon.com/optimising-your-application-bundle-size-with-webpack-e85b00bab579#.5w5ko08pq)
* [Analyzing & optimizing your webpack bundle](https://medium.com/@ahmedelgabri/analyzing-optimizing-your-webpack-bundle-8590818af4df#.hce4vdjs9)
* [Analysing and minimising the size of client side bundle with webpack and source-map-explorer](https://medium.com/@nimgrg/analysing-and-minimising-the-size-of-client-side-bundle-with-webpack-and-source-map-explorer-41096559beca#.c3t2srr8x)


### Output Options

This set of options allows you to manipulate certain [output](/configuration/output) parameters of your build.
Expand All @@ -138,6 +145,7 @@ This set of options allows you to manipulate certain [output](/configuration/out
| --output-public-path | The public path for the assets | string | / |
| --output-source-map-filename | The output filename for the SourceMap | string | [name].map or [outputFilename].map |


#### Example Usage

```bash
Expand Down Expand Up @@ -166,6 +174,7 @@ webpack.js index=./src/index.js index2=./src/index2.js --output-path='./dist' --
[2] ./src/index2.js 54 bytes {0} [built]
```


### Debug Options

This set of options allows you to better debug the application containing assets compiled with webpack
Expand All @@ -176,6 +185,7 @@ This set of options allows you to better debug the application containing assets
| --devtool | Define [source map type](/configuration/devtool/) for the bundled resources | string | - |
| --progress | Print compilation progress in percentage | boolean | false |


### Module Options

These options allow you to bind [modules](/configuration/module/) as allowed by webpack
Expand All @@ -186,6 +196,7 @@ These options allow you to bind [modules](/configuration/module/) as allowed by
| --module-bind-post | Bind an extension to a post loader | |
| --module-bind-pre | Bind an extension to a pre loader | |


### Watch Options

These options makes the build [watch](/configuration/watch/) for changes in files of the dependency graph and perform the build again.
Expand All @@ -198,6 +209,7 @@ These options makes the build [watch](/configuration/watch/) for changes in file
| --watch-poll | The polling interval for watching (also enable polling) |
| --watch-stdin, --stdin | Exit the process when stdin is closed |


### Optimize Options

These options allow you to manipulate optimisations for a production build using webpack
Expand All @@ -208,6 +220,7 @@ These options allow you to manipulate optimisations for a production build using
| --optimize-min-chunk-size | Try to keep the chunk size above a limit | [MinChunkSizePlugin](/plugins/min-chunk-size-plugin) |
| --optimize-minimize | Minimize javascript and switches loaders to minimizing | [UglifyJsPlugin](/plugins/uglifyjs-webpack-plugin/) & [LoaderOptionsPlugin](/plugins/loader-options-plugin/) |


### Resolve Options

These allow you to configure the webpack [resolver](/configuration/resolve/) with aliases and extensions.
Expand All @@ -218,6 +231,7 @@ These allow you to configure the webpack [resolver](/configuration/resolve/) wit
| --resolve-extensions | Setup extensions that should be used to resolve,modules | --resolve-extensions .es6 .js .ts |
| --resolve-loader-alias | Minimize javascript and switches loaders to minimizing | |


### Stats Options

These options allow webpack to display various [stats](/configuration/stats/) and style them differently in the console output.
Expand All @@ -241,6 +255,7 @@ These options allow webpack to display various [stats](/configuration/stats/) an
| --sort-modules-by | Sorts the modules list by property in module | string |
| --verbose | Show more details | boolean |


### Advanced Options

| Parameter | Explanation | Usage |
Expand All @@ -265,6 +280,7 @@ These options allow webpack to display various [stats](/configuration/stats/) an
| -d | --debug --devtool eval-cheap-module-source-map --output-pathinfo |
| -p | --optimize-minimize --define process.env.NODE_ENV="production", see [building for production](/guides/production-build) |


### Profiling

This option profiles the compilation and includes this information in the stats output. It gives you an in depth idea of which step in the compilation is taking how long. This can help you optimise your build in a more informed manner.
Expand Down
Loading