@jackliulovelt/dj-cli
a frontend cli
Last updated 2 months ago by jackliulovelt .
ISC · Original npm · Tarball · package.json
$ cnpm install @jackliulovelt/dj-cli 
SYNC missed versions from official npm registry.

fecli 前端应用 脚手架

安装

npm i -g @jackliulovelt/dj-cli

命令

  • 查看现有模板 fecli l

  • 查看git配置 fecli c

  • 设置git配置 fecli sc

  • 初始化一个项目模板 fecli init

  • 新建一个文件模板 fecli new

    • 需进入待生成文件模板的目录,再执行命令
    • 目前支持的文件模板有 router 、controller 、service
    • 文件模板的新增方式:在 templates 目录下新增 xxx.js,定义 prompts 和 stringFn 即可。

项目模板配置

形如以下形式

  • replace 是需要替换变量的信息

  • 在初始化项目的时候会提示输入,在git clone 之后对replace.paths下的文件进行替换

  • replace.paths 默认为项目根路径

  • 项目模板需要用 $${变量名}$$ 写好在需要替换的文件中

"eggjs": {
  "url": "https://gitlab.51zcm.cc/front/service",
  "branch": "test",
  "description": "eggjs S端模板",
  "replace": {
    "variables": {
      "spaceName": "k8s 部署空间",
      "k8sServerName": "服务名",
      "dockerRegistryNamespace": "docker 仓库空间"
    },
    "paths": [
      "Jenkinsfile",
      "package.json",
      "build.sh"
    ]
  }
}

Current Tags

  • 1.1.5                                ...           latest (2 months ago)

12 Versions

  • 1.1.5                                ...           2 months ago
  • 1.1.4                                ...           2 months ago
  • 1.1.3                                ...           3 months ago
  • 1.1.2                                ...           5 months ago
  • 1.1.1                                ...           5 months ago
  • 1.1.0                                ...           5 months ago
  • 1.0.5                                ...           5 months ago
  • 1.0.4                                ...           5 months ago
  • 1.0.3                                ...           5 months ago
  • 1.0.2                                ...           5 months ago
  • 1.0.1                                ...           5 months ago
  • 1.0.0                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 25
Dependencies (7)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |