LegoFlow v3
安装
$ yarn global add legoflow # 或者 $ npm i legoflow -g
创建项目
# 默认创建项目为 Vue 2.0 项目 $ lfx create [name] # 创建以路径文件夹为名称的项目 $ lfx create
拉取远程项目模板,创建项目
$ lfx create [name] --remote <NPM Repo Name/Git Repo URL> # 例子 - 拉取远程默认项目模板 $ lfx create demo --remote react$ lfx create demo --remote jquery # 例子 - 拉取远程 NPM Repo Name 模板 $ lfx create demo --remote legoflow-project-react # 例子 - 拉取远程 Git Repo URL 模板 $ lfx create demo --remote https://github.com/lijialiang/legoflow-project-react.git
规范化
默认项目类型 Vue,远程项目类型 jQuery、React 均支持 ESLint(Standard)、Git Commit Log(Angular) 等规范化配置。
以 VSCode 为例,安装 ESLint
插件后,打开创建后的项目即可。
// vscode eslint 常用配置// 保存时自动格式化"eslint.codeActionsOnSave": true,// 验证哪些语言格式文件"eslint.validate":