diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7af602ab91a..8967c8f0169 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,9 @@ + + + + + **What kind of change does this PR introduce?** @@ -8,17 +13,11 @@ -**If relevant, link to documentation update:** - - - -**Summary** - - - - **Does this PR introduce a breaking change?** -**Other information** +**What needs to be documented once your changes are merged?** + + + diff --git a/.gitignore b/.gitignore index f7a05a2b815..32814bb493a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ *.log .idea .vscode +.eslintcache package-lock.json diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000000..1d89e6bbbc7 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,14 @@ +# Ignore all paths. +**/*.* + +# Enable prettier for the following paths. +!setup/**/*.js +!lib/**/*.js +!bin/*.js +!hot/*.js +!buildin/*.js +!test/*.js +!test/**/webpack.config.js +!examples/**/webpack.config.js +!schemas/**/*.js +!declarations.d.ts diff --git a/.travis.yml b/.travis.yml index b1cc16a5835..184cf5ee220 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,42 +9,56 @@ branches: cache: yarn: true + directories: + - ".jest-cache" + - ".eslintcache" + +stages: + - basic + - advanced + - versions matrix: include: - os: linux node_js: "10" - env: NO_WATCH_TESTS=1 JOB_PART=lint + env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=basic + stage: basic - os: linux node_js: "10" - env: NO_WATCH_TESTS=1 JEST=--maxWorkers=2 JOB_PART=integration - - os: linux - node_js: "8" - env: NO_WATCH_TESTS=1 JEST=--maxWorkers=2 JOB_PART=integration + env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=lint-unit + stage: advanced - os: linux node_js: "10" - env: NO_WATCH_TESTS=1 JOB_PART=unit - - os: linux - node_js: "6" - env: NO_WATCH_TESTS=1 JEST=--maxWorkers=2 JOB_PART=integration + env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration + stage: advanced - os: osx node_js: "10" - env: NO_WATCH_TESTS=1 JEST=--maxWorkers=2 JOB_PART=integration + env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration + stage: versions + - os: linux + node_js: "8" + env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration + stage: versions + - os: linux + node_js: "6" + env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration + stage: versions + fast_finish: true allow_failures: - os: osx - fast_finish: true install: - yarn --frozen-lockfile - yarn link --frozen-lockfile || true - yarn link webpack --frozen-lockfile -script: npm run travis:$JOB_PART +script: yarn travis:$JOB_PART after_success: - cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose - bash <(curl -s https://codecov.io/bash) -F $JOB_PART -X gcov - - rm -rf ./coverage + - rm -f .jest-cache/haste-map* .jest-cache/perf-cache* notifications: slack: diff --git a/README.md b/README.md index 9a8c423f813..cb5e32d94ad 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ + + install size + @@ -84,25 +87,30 @@ interface](https://webpack.js.org/plugins/). Most of the features within webpack itself use this plugin interface. This makes webpack very **flexible**. -|Name|Status|Description| -|:--:|:----:|:----------| -|[extract-text-webpack-plugin][extract]|![extract-npm]|Extracts Text (CSS) from your bundles into a separate file (app.bundle.css)| -|[compression-webpack-plugin][compression]|![compression-npm]|Prepares compressed versions of assets to serve them with Content-Encoding| -|[i18n-webpack-plugin][i18n]|![i18n-npm]|Adds i18n support to your bundles| -|[html-webpack-plugin][html-plugin]|![html-plugin-npm]| Simplifies creation of HTML files (`index.html`) to serve your bundles| +|Name|Status|Install Size|Description| +|:--:|:----:|:----------:|:----------| +|[extract-text-webpack-plugin][extract]|![extract-npm]|![extract-size]|Extracts Text (CSS) from your bundles into a separate file (app.bundle.css)| +|[compression-webpack-plugin][compression]|![compression-npm]|![compression-size]|Prepares compressed versions of assets to serve them with Content-Encoding| +|[i18n-webpack-plugin][i18n]|![i18n-npm]|![i18n-size]|Adds i18n support to your bundles| +|[html-webpack-plugin][html-plugin]|![html-plugin-npm]|![html-plugin-size]| Simplifies creation of HTML files (`index.html`) to serve your bundles| [common-npm]: https://img.shields.io/npm/v/webpack.svg [extract]: https://github.com/webpack/extract-text-webpack-plugin [extract-npm]: https://img.shields.io/npm/v/extract-text-webpack-plugin.svg +[extract-size]: https://packagephobia.now.sh/badge?p=extract-text-webpack-plugin [component]: https://github.com/webpack/component-webpack-plugin [component-npm]: https://img.shields.io/npm/v/component-webpack-plugin.svg +[component-size]: https://packagephobia.now.sh/badge?p=component-webpack-plugin [compression]: https://github.com/webpack/compression-webpack-plugin [compression-npm]: https://img.shields.io/npm/v/compression-webpack-plugin.svg +[compression-size]: https://packagephobia.now.sh/badge?p=compression-webpack-plugin [i18n]: https://github.com/webpack/i18n-webpack-plugin [i18n-npm]: https://img.shields.io/npm/v/i18n-webpack-plugin.svg +[i18n-size]: https://packagephobia.now.sh/badge?p=i18n-webpack-plugin [html-plugin]: https://github.com/ampedandwired/html-webpack-plugin [html-plugin-npm]: https://img.shields.io/npm/v/html-webpack-plugin.svg +[html-plugin-size]: https://packagephobia.now.sh/badge?p=html-webpack-plugin ### [Loaders](https://webpack.js.org/loaders/) @@ -115,121 +123,154 @@ or are automatically applied via regex from your webpack configuration. #### Files -|Name|Status|Description| -|:--:|:----:|:----------| -|[raw-loader][raw]|![raw-npm]|Loads raw content of a file (utf-8)| -|[val-loader][val]|![val-npm]|Executes code as module and considers exports as JS code| -|[url-loader][url]|![url-npm]|Works like the file loader, but can return a Data Url if the file is smaller than a limit| -|[file-loader][file]|![file-npm]|Emits the file into the output folder and returns the (relative) url| +|Name|Status|Install Size|Description| +|:--:|:----:|:----------:|:----------| +|[raw-loader][raw]|![raw-npm]|![raw-size]|Loads raw content of a file (utf-8)| +|[val-loader][val]|![val-npm]|![val-size]|Executes code as module and considers exports as JS code| +|[url-loader][url]|![url-npm]|![url-size]|Works like the file loader, but can return a Data Url if the file is smaller than a limit| +|[file-loader][file]|![file-npm]|![file-size]|Emits the file into the output folder and returns the (relative) url| [raw]: https://github.com/webpack/raw-loader [raw-npm]: https://img.shields.io/npm/v/raw-loader.svg +[raw-size]: https://packagephobia.now.sh/badge?p=raw-loader [val]: https://github.com/webpack/val-loader [val-npm]: https://img.shields.io/npm/v/val-loader.svg +[val-size]: https://packagephobia.now.sh/badge?p=val-loader [url]: https://github.com/webpack/url-loader [url-npm]: https://img.shields.io/npm/v/url-loader.svg +[url-size]: https://packagephobia.now.sh/badge?p=url-loader [file]: https://github.com/webpack/file-loader [file-npm]: https://img.shields.io/npm/v/file-loader.svg +[file-size]: https://packagephobia.now.sh/badge?p=file-loader #### JSON -|Name|Status|Description| -|:--:|:----:|:----------| -||![json-npm]|Loads a JSON file (included by default)| -||![json5-npm]|Loads and transpiles a JSON 5 file| -||![cson-npm]|Loads and transpiles a CSON file| +|Name|Status|Install Size|Description| +|:--:|:----:|:----------:|:----------| +||![json-npm]|![json-size]|Loads a JSON file (included by default)| +||![json5-npm]|![json5-size]|Loads and transpiles a JSON 5 file| +||![cson-npm]|![cson-size]|Loads and transpiles a CSON file| [json-npm]: https://img.shields.io/npm/v/json-loader.svg +[json-size]: https://packagephobia.now.sh/badge?p=json-loader [json5-npm]: https://img.shields.io/npm/v/json5-loader.svg +[json5-size]: https://packagephobia.now.sh/badge?p=json5-loader [cson-npm]: https://img.shields.io/npm/v/cson-loader.svg +[cson-size]: https://packagephobia.now.sh/badge?p=cson-loader #### Transpiling -|Name|Status|Description| -|:--:|:----:|:----------| -|`