create-init-cli
v1.0.1-beta.0
Published
A scaffolding tool that creates and initializes projects with options for selecting frameworks, languages, UIs, and configuration files. It supports remote template downloads and template caching.
Readme
作用
一个脚手架工具:创建并初始化项目,框架、语言、ui选择、规范文件等的选择,可以实现远程模板下载,可以实现缓存模板。
环境
node >= 18
命令
cptc init [projectName] # 创建命令时输入项目名可选
cptc create <projectName> # 创建命令时必输项目名文件
bin
cli.js // 命令启动逻辑
lib
gennerators
defaultTemplate // 从远程git获取的默认配置项目模板逻辑
code.json // 配置默认引入的代码
framework.js // 前端框架引入逻辑
index.js
lint.js // 规范插件引入逻辑
ui.js // ui插件引入逻辑
templates // 模板文件夹
create.js // 项目创建命令交互逻辑
saveTemplate.js // 保存模板配置到本地
selectConfig.js // 交互配置
utils.js // 通用工具本地调试
- 在根目录执行
npm link
- 在需要创建项目文件夹下执行
npm create app-demo
