5

前端自动化构建工具 ---- Plop

 2 years ago
source link: https://www.joynop.com/p/424.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

前端自动化构建工具 ---- Plop

plop:可以通过命令行去生成、处理文件模板代码等.使用条件参考:项目的每个模块的结构骨架都非常相似,引入模版内容相同就可以使用Plop来实现自动化了,Plop旨在根据模板文件自动化创建组件。

受制于Vue语法限制以及vscode失败的拆件,采用了plop 自动化构建模版

安装plop

  • 安装到项目
npm install --save-dev plop
  • 全局安装plop(可选,建议安装方便使用)
npm install -g plop

如果没有全局安装plop,那么要在package.json中的script中增加脚本命令:

"scripts": {
    "p": "plop"
 },
yarn new

plop-templates.zip

打赏: , - (付款时请注明赞赏)

标签: Vue, 项目, plop, 安装, npm, install, 自动化


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK