Skip to content

Commit

Permalink
docs(docs inspect): 增加inspect命令行
Browse files Browse the repository at this point in the history
  • Loading branch information
luoxue committed Dec 16, 2019
1 parent 8e5c678 commit f8c0a3a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ npm link # 建立软连接,可以使用 webpack-box 命令
<summary>点击关闭/打开使用</summary><br/>

```bash
# --- 项目构建 ---
webpack-box dev # 开发环境
webpack-box build # 生产环境
webpack-box dll # 编译差分包
Expand All @@ -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 中使用
Expand Down
10 changes: 10 additions & 0 deletions docs/课时-19.md
Original file line number Diff line number Diff line change
@@ -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 # 查看指定插件配置
```
Binary file removed public/asset/logo.jpg
Binary file not shown.
9 changes: 9 additions & 0 deletions util/readme/useAndIntsall.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ npm link # 建立软连接,可以使用 webpack-box 命令
<summary>点击关闭/打开使用</summary><br/>

```bash
# --- 项目构建 ---
webpack-box dev # 开发环境
webpack-box build # 生产环境
webpack-box dll # 编译差分包
Expand All @@ -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 中使用
Expand Down

0 comments on commit f8c0a3a

Please sign in to comment.