Skip to content

Fix Testing/Linting Issues #1112

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 6 commits into from
Apr 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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"
]
}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ indent_style = space
indent_size = 2

# Format Config
[{package.json}]
[{package.json,.alexrc,babelrc,.eslintignore,.eslintrc,.markdownlintrc,.proselintrc}]
indent_style = space
indent_size = 2
3 changes: 2 additions & 1 deletion .markdownlintrc
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
}
}
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