We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
在利用脚手架创建出来的项目基础框架代码中,我们有哪些基础功能呢? 这里我们一一介绍
利用 prettier 工具自动格式化我们的代码 可以在 .prettierrc 和 .prettierignore 中进行相应的配置
prettier
.prettierrc
.prettierignore
利用 eslint 工具检测我们的 js 代码的规范问题 可以在 .eslintrc.js 和 .eslintignore 中进行相应的配置
eslint
.eslintrc.js
.eslintignore
利用 stylelint 工具检测我们的 css 代码的规范问题 可以在 .stylelintrc 中进行相应的配置
stylelint
.stylelintrc
在 git commit 之前,执行 lint-staged,对我们的代码进行 prettier 格式化,并执行 lint
git commit
lint-staged
lint
在 git commit 之前,执行 commitlint 检查 commit msg 规范,具体规范可参考 commitlint-config-imt
commitlint
commit msg
使用 gulp 提供构建能力,版本为 4.0.0,可以基于它进行任何的功能扩展
gulp
4.0.0
通过 gulp 接入了 postcss 功能,会把小程序项目中的 css 文件自动编译成 wxss 文件 在根目录下,执行以下命令即可开启此功能:
postcss
css
wxss
npm run dev
通过 gulp 接入了图片压缩功能,执行以下命令:
npm run compress