前端自动创建模版文件夹的 cli。
node-generate-cli
一键创建模版文件夹的 cli。
安装yarn global add node-generate-cli
or
npm install node-generate-cli -g 使用
第一步,初始化环境,生成 xgen.json 和 .templates 文件夹。
$ xgen init
// xgen.json { "types": { "view": { "template": "./.templates/view", // 模版地址 "dir": "./src/pages/" // 生成地址 }, "component": { "template": "./.templates/component", "dir": "./src/components/" } } }
第二步:可以跟进项目情况修改 xgen.json 以及 template 下的内容。
第三步,根据需要创建模板
$ xgen build
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。