From f8c0a3a0f3e291852086e89a73b91e4e39845185 Mon Sep 17 00:00:00 2001 From: luoxue Date: Mon, 16 Dec 2019 15:26:06 +0800 Subject: [PATCH] =?UTF-8?q?docs(docs=20inspect):=20=E5=A2=9E=E5=8A=A0inspe?= =?UTF-8?q?ct=E5=91=BD=E4=BB=A4=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + README.md | 9 +++++++++ "docs/\350\257\276\346\227\266-19.md" | 10 ++++++++++ public/asset/logo.jpg | Bin 22505 -> 0 bytes util/readme/useAndIntsall.md | 9 +++++++++ 5 files changed, 29 insertions(+) delete mode 100644 public/asset/logo.jpg diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dfabc26..9a8a254d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,7 @@ docs | 修改文档 | [bdc9a97](https://github.com/luoxue-victor/learn_webpack/commit/bdc9a97) eslint 文档 | 修改eslint 文档,并添加cwd分层 | [d23329b](https://github.com/luoxue-victor/learn_webpack/commit/d23329b) logo | 修改logo | [b167240](https://github.com/luoxue-victor/learn_webpack/commit/b167240) + logo | logo 居中 | [8e5c678](https://github.com/luoxue-victor/learn_webpack/commit/8e5c678) readme | 17->18 | [6cc2e69](https://github.com/luoxue-victor/learn_webpack/commit/6cc2e69) readme | 保存文档 | [99c82c1](https://github.com/luoxue-victor/learn_webpack/commit/99c82c1) readme | 代码折叠默认展开 | [01e1ea8](https://github.com/luoxue-victor/learn_webpack/commit/01e1ea8) diff --git a/README.md b/README.md index 47854fc7..e582dbb4 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ npm link # 建立软连接,可以使用 webpack-box 命令 点击关闭/打开使用
```bash +# --- 项目构建 --- webpack-box dev # 开发环境 webpack-box build # 生产环境 webpack-box dll # 编译差分包 @@ -70,10 +71,18 @@ webpack-box build index # 指定页面编译(多页面) webpack-box build index --report # 开启打包分析 webpack-box build:ssr # 编译ssr webpack-box ssr:server # 在 server 端运行 +# --- 执行lint修复功能 --- webpack-box lint eslint # 自动修复 eslint 错误 webpack-box lint tslint # 自动修复 tslint 错误 webpack-box lint stylelint # 自动修复 stylelint 错误 +# 切换 webpack 版本 webpack-box upgrade 5 # 可以切换到 webpack5/4 +# --- 检查配置 --- +webpack-box inspect > output.json # 导出所有配置到 output.json +webpack-box inspect --rules # 查看所有 loader 列表 +webpack-box inspect --rule babel # 查看指定 loader 配置 +webpack-box inspect --plugins # 查看所有插件列表 +webpack-box inspect --plugin mini-css-extract # 查看指定插件配置 ``` 在 package.json 中使用 diff --git "a/docs/\350\257\276\346\227\266-19.md" "b/docs/\350\257\276\346\227\266-19.md" index 0fe96b7a..285842cf 100644 --- "a/docs/\350\257\276\346\227\266-19.md" +++ "b/docs/\350\257\276\346\227\266-19.md" @@ -1 +1,11 @@ ## 课时 19:添加 webpack 配置检查命令 + +webpack-chain 的配置有一个很大的缺陷就是,你不能很直观的看出到底有哪些配置,除非你对所有配置都非常了解。所以这里我做了一个检查配置的命令 + +```bash +webpack-box inspect > output.json # 导出所有配置到 output.json +webpack-box inspect --rules # 查看所有 loader 列表 +webpack-box inspect --rule babel # 查看指定 loader 配置 +webpack-box inspect --plugins # 查看所有插件列表 +webpack-box inspect --plugin mini-css-extract # 查看指定插件配置 +``` diff --git a/public/asset/logo.jpg b/public/asset/logo.jpg deleted file mode 100644 index 8435ee656d8d841ba15853a25d5e8e4478bd4a68..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22505 zcmeIa2V7HawIu!C?HLGuMrgx5Re)=3Q{8=y%P}u4NX8mPZTI1-PZIqNW1C!vg^D za9@C{8Ned|5y1_@8w5mzHwcM|h=|Fk$jC@Z$>?uW-lSrtXJKKYXJTaIxX;CQhwly} z(>-x+K0zT7Q4v-yNm)r@+55sG!oN>~M?_3aMnXnMMn)&h&crVKPrt6d0d5mr8@e`x zk9QYv?KU3%ZM>^a02}T;3Gn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46@}vvfDNh*D-FCv`+~A6Sh74>1oOTj8x~ZbN点击关闭/打开使用
```bash +# --- 项目构建 --- webpack-box dev # 开发环境 webpack-box build # 生产环境 webpack-box dll # 编译差分包 @@ -24,10 +25,18 @@ webpack-box build index # 指定页面编译(多页面) webpack-box build index --report # 开启打包分析 webpack-box build:ssr # 编译ssr webpack-box ssr:server # 在 server 端运行 +# --- 执行lint修复功能 --- webpack-box lint eslint # 自动修复 eslint 错误 webpack-box lint tslint # 自动修复 tslint 错误 webpack-box lint stylelint # 自动修复 stylelint 错误 +# 切换 webpack 版本 webpack-box upgrade 5 # 可以切换到 webpack5/4 +# --- 检查配置 --- +webpack-box inspect > output.json # 导出所有配置到 output.json +webpack-box inspect --rules # 查看所有 loader 列表 +webpack-box inspect --rule babel # 查看指定 loader 配置 +webpack-box inspect --plugins # 查看所有插件列表 +webpack-box inspect --plugin mini-css-extract # 查看指定插件配置 ``` 在 package.json 中使用