Replies: 2 comments
-
|
建议不要把 tinycli 的 plugins 和 toolkits 分到两个仓库来搞,其实这两种是非常类似的,并没有名字差别那么大,只有使用上的一点差异,可以使用 tiny-cli-extensions 来放这些扩展。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
TinyPro 已迁移至:opentiny/tiny-pro |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
TinyCLI 是一站式前端工程化CLI工具,用于提供业务从本地开发、 构建到上线的全流程支撑,并且支持插件化架构,包含脚手架套件(Toolkit)和命令行插件(Plugin),可以用来创建 TinyPro 后台管理系统、Docs 组件库网站等。
目前这些 TinyCLI 的工程里既包含了 CLI 核心包,也包含了 Toolkit / Plugin 等套件/插件,整体目录结构层级较深。
比如我想找到 TinyPro Vue 前端源码,需要进入5层目录:
packages/toolkits/pro/template/tinyvue。如果想要找到 TinyPro Vue 后端源码,需要进入6层目录:
packages/toolkits/pro/template/server/nestJs。开发者很难找到,当开发者问我们你们的 TinyPro 源码在哪里,我们都说在:https://github.com/opentiny/tiny-cli。
开发者又问,这不是 TinyCLI 的源码吗?于是我们又要解释 TinyPro 是 TinyCLI 的一个套件,它的源码其实在 TinyCLI 里面:https://github.com/opentiny/tiny-cli/tree/dev/packages/toolkits/pro/template/tinyvue。
对于一个开源项目来说,如果开发者都找不到它的源码,这个开源项目又如何能得到发展呢?
我建议将 TinyCLI 的目录结构进行一些优化和拆分单独仓库。
现状
这是 TinyCLI 目前的目录结构:
优化建议
建议将 toolkit / plugin 从 TinyCLI 核心包中剥离,单独仓库进行维护,并通过 pnpm 进行子包的管理。
packages/cli 中的子包平铺出来,通过 pnpm 进行子包管理,目录结构如下:
tiny-cli-plugins 中的 pro 单独仓库维护。
目录结构如下:
Beta Was this translation helpful? Give feedback.
All reactions