Skip to content

Commit

Permalink
chore(webpack): Organize webpack build logs (#300)
Browse files Browse the repository at this point in the history
Add webpack-stylish module

Fix #299
Close #300
  • Loading branch information
netil committed Feb 20, 2018
1 parent a0b6542 commit 9d7bc9b
Show file tree
Hide file tree
Showing 5 changed files with 216 additions and 9 deletions.
3 changes: 2 additions & 1 deletion config/webpack.config.development.js
Expand Up @@ -4,7 +4,8 @@ const ExtractTextPlugin = require("extract-text-webpack-plugin");
const config = {
devtool: "inline-source-map",
devServer: {
publicPath: "/dist/"
publicPath: "/dist/",
stats: "minimal"
},
module: {
rules: [{
Expand Down
176 changes: 176 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -94,6 +94,7 @@
"webpack-common-shake": "^1.5.3",
"webpack-dev-server": "^2.7.1",
"webpack-merge": "^4.1.0",
"webpack-stylish": "^0.1.5",
"write-file-webpack-plugin": "^4.1.0",
"xml2js": "^0.4.18"
}
Expand Down
7 changes: 5 additions & 2 deletions webpack.config.js
Expand Up @@ -2,6 +2,7 @@ const pkg = require("./package.json");
const path = require("path");
const webpack = require("webpack");
const StringReplacePlugin = require("string-replace-webpack-plugin");
const Stylish = require("webpack-stylish");

const config = {
entry: {
Expand Down Expand Up @@ -34,8 +35,10 @@ const config = {
},
plugins: [
new StringReplacePlugin(),
new webpack.optimize.ModuleConcatenationPlugin()
]
new webpack.optimize.ModuleConcatenationPlugin(),
new Stylish()
],
stats: "minimal"
};

module.exports = env =>
Expand Down
38 changes: 32 additions & 6 deletions yarn.lock
Expand Up @@ -4023,6 +4023,10 @@ ipaddr.js@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.5.2.tgz#d4b505bde9946987ccf0fc58d9010ff9607e3fa0"

irregular-plurals@^1.0.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.4.0.tgz#2ca9b033651111855412f16be5d77c62a458a766"

is-absolute-url@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6"
Expand Down Expand Up @@ -4805,7 +4809,7 @@ log-driver@^1.2.5:
dependencies:
codecov.io "0.0.1"

log-symbols@^2.1.0:
log-symbols@^2.1.0, log-symbols@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
dependencies:
Expand Down Expand Up @@ -5820,6 +5824,12 @@ pkg-dir@^2.0.0:
dependencies:
find-up "^2.1.0"

plur@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a"
dependencies:
irregular-plurals "^1.0.0"

pluralize@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777"
Expand Down Expand Up @@ -6094,6 +6104,10 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"

pretty-bytes@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"

private@^0.1.6, private@^0.1.7:
version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
Expand Down Expand Up @@ -7510,7 +7524,7 @@ text-encoding@^0.6.4:
version "0.6.4"
resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19"

text-table@~0.2.0:
text-table@^0.2.0, text-table@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"

Expand Down Expand Up @@ -7973,6 +7987,18 @@ webpack-sources@^1.0.1, webpack-sources@^1.1.0:
source-list-map "^2.0.0"
source-map "~0.6.1"

webpack-stylish@^0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/webpack-stylish/-/webpack-stylish-0.1.5.tgz#2e58f08babbfb25d2f8b25f746762c9d437b06d2"
dependencies:
chalk "^2.3.0"
log-symbols "^2.2.0"
plur "^2.1.2"
pretty-bytes "^4.0.2"
strip-ansi "^4.0.0"
text-table "^0.2.0"
wordwrap "^1.0.0"

webpack@^3.1.0, webpack@^3.11.0:
version "3.11.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.11.0.tgz#77da451b1d7b4b117adaf41a1a93b5742f24d894"
Expand Down Expand Up @@ -8047,14 +8073,14 @@ wordwrap@0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"

wordwrap@^1.0.0, wordwrap@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"

wordwrap@~0.0.2:
version "0.0.3"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"

wordwrap@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"

worker-farm@^1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.2.tgz#32b312e5dc3d5d45d79ef44acc2587491cd729ae"
Expand Down

0 comments on commit 9d7bc9b

Please sign in to comment.