diff --git a/blog/webpack/webpack-loader.md b/blog/webpack/webpack-loader.md index 43f1cb5a7d71771143c2aabdaab21a35a42e013a..3ee46ea1d66effdf075cf10069b6d3f1f8cba3a0 100644 --- a/blog/webpack/webpack-loader.md +++ b/blog/webpack/webpack-loader.md @@ -10,7 +10,7 @@ loader 将不同类型的文件转换为 webpack 可识别的模块 loader 执行优先级: -``` +```bash pre: 前置 loader normal: 普通 loader inline: 内联 loader @@ -41,7 +41,7 @@ module: { 指定优先级 -``` +```js // 此时loader执行顺序:loader1 - loader2 - loader3 module: { rules: [ @@ -166,7 +166,7 @@ console.log("Hello World"); 编译打包 -``` +```bash # 安装依赖 $ pnpm add webpack webpack-cli diff --git a/doc/javascript.md b/doc/javascript.md index a6042d7a6051725bdcc5fd9382801148f9b885bf..e0e81fd05c19dc657213e7f20dedc8c7f2aa27e2 100644 --- a/doc/javascript.md +++ b/doc/javascript.md @@ -89,7 +89,30 @@ https://npm.devtool.tech/ [Express 中文网](https://www.expressjs.com.cn/): 基于 Node.js 平台,快速、开放、极简的 Web 开发框架 -[Yarn 中文文档](https://yarn.bootcss.com/)快速、可靠、安全的依赖管理工具 + +nvm: Node Version Manager [https://github.com/nvm-sh/nvm](https://github.com/nvm-sh/nvm) + +### 包管理工具 + +npm - a JavaScript package manager +- ![](https://img.shields.io/github/last-commit/npm/cli?style=flat-square) +- ![](https://img.shields.io/github/stars/npm/cli.svg?style=social) +- github [https://github.com/npm/cli](https://github.com/npm/cli) +- [npm 中文文档](https://www.npmjs.cn/) + +Yarn: 快速、可靠、安全的依赖管理工具 +- ![](https://img.shields.io/github/last-commit/yarnpkg/berry?style=flat-square) +- ![](https://img.shields.io/github/stars/yarnpkg/berry.svg?style=social) +- [https://yarnpkg.com/](https://yarnpkg.com/) +- github: [https://github.com/yarnpkg/berry](https://github.com/yarnpkg/berry) +- Yarn 中文文档: [https://yarn.bootcss.com/](https://yarn.bootcss.com/) +- Yarn 中文文档: [https://www.yarnpkg.cn/](https://www.yarnpkg.cn/) + +pNpm:速度快、节省磁盘空间的软件包管理器 +- ![](https://img.shields.io/github/last-commit/pnpm/pnpm?style=flat-square) +- ![](https://img.shields.io/github/stars/pnpm/pnpm.svg?style=social) +- [pnpm 中文文档](https://www.pnpm.cn/) + ## 文章