1.0.6 • Published 3 years ago

yinumb-template v1.0.6

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

Yinumb-Template

这是专门为生成项目模板而打造的脚手架,开发者可根据自己的喜好制作模板然后保存起来,在开发新项目时只需要用保存的模板创建即可,从此不再需要在使用脚手架初始化项目后各种调节。其也内置了诸多的钩子,让你的项目更加的自动化~ (如有错误或建议欢迎提交至邮箱: yinumb@gmail.com)

This is a scaffolding specially created for generating project templates. Developers can make templates according to their own preferences and save them. When developing new projects, they only need to create with the saved templates. From now on, it is no longer necessary to use the scaffolding to initialize the project. Various adjustments. It also has many built-in hooks to make your project more automated~ (If you have any errors or suggestions, please submit them to the email: yinumb@gmail.com)


模块安装 (Module installation)

npm i yinumb-template -g

初始化项目 (Initialize the project)

ytp init umi --remote   // 初始化一个 umi 项目

以当前项目创建一个新模板 (Create a new template)

ytp -p newTemplate

压缩项目 (Compressed project)

ytp -z

解压项目 (Unzip the project)

ytp unzip

查看模板列表 (View the list of templates)

ytp list

更多命令 (More commands)

ytp -h


钩子函数 (Hook function)

此配置文件需使用 ytp hook --get 进行获取,在修改完成后可使用 ytp hook --save 进行保存 This configuration file needs to be obtained using ytp hook --get, and can be saved using ytp hook --save after the modification is completed.

initAfter(params: Params)   // 模板创建前调用
initBefore(params: Params)   // 模板创建后调用
publishAfter(params: Params)   // 模板提交后调用
publishBefor(params: Params)   // 模板提交前调用
deleteAfter(params: Params)   // 模板删除后调用
deleteBefore(params: Params)   // 模板删除前调用
zipAfter(params: Params)   // 压缩完成后调用
zipBefore(params: Params)   // 压缩进行前调用
unzipAfter(params: Params)   // 解压完成后调用
unzipBefore(params: Params)   // 解压进行前调用
saveHookAfte(params: Params)   // 保存hook文件后调用
other(params: Params)   // 指令未匹配到时调用
1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago