3.0.0 • Published 1 year ago

kod-react v3.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Kod 框架

kod 框架是一个基于 create-react-app 脚手架集成 react 全家桶而封装好的项目架构,kod 的目标是为了更好的、更全面的、方便开发而封装好的一套集成项目框架,内嵌 commander.jsinquirer.jsnode.js 分化开发的一些指令,方便项目管理、规范化项目源码、智能化开发操作。


在企业开发项目中,普遍存在一些这样的问题:

1.项目命名不规范,有的长有的端,整体目录结构浏览不佳,命名随意无描述性

2.项目结构混乱,多人开发无法保持一致性,人员交接工作难,不顺利

3.项目组件化、模块化不清晰,业务交错整理不清晰,增加后期运维难度


更新事项

  1. 调整了通过 kod init 方式进行初始化一个面板或一个组件,不传参数则表示初始化一个项目
  2. 调整了通过 kod remove 方式进行销毁一个面板或多个私有组件
  3. 调整了通过 kod init -t 进行初始化一个基于 typescript 语法糖项目

指令相关

$ kod -v
3.0.0

$ kod -h
Usage: index [options] <cmd> [env]

Options:
  -v,--version      output the version number
  -t, --typescript  when initializing the project, define the use of typescript script engine.
  -p, --pane        create a new page into the panes of the project.
  -c, --component   create a new component into the components of the project.
  init [name]       Initialize a project.
  remove <-p | -c>  remove a pane or pane's component of the project.
  -h, --help        display help for command

kod -v 用于查看 kod 版本

kod -h 用于kod 帮助文档

kod init project-name <-t> 用于创建项目,系统必须安装 Git,否则无法克隆到项目,-t 表示项目采用 typescript 语法糖,否则默认采用 javascript 语法糖

kod init pane-name -p 用于创建面板

kod init pane-name -c 用于创建组件,包含:面板中的私有组件、通用组件

kod remove <-p | -c> 用于移除面板或面板中的私有组件,通用组件不能移除,在移除私有组件的时候,请确保私有组件在面板中的引入或使用为单行,可进行多个私有组件删除操作