1.0.5 • Published 6 years ago

byted-gulu-cli v1.0.5

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

byted-gulu-cli

A command line tool for gulu.

安装

首先保证本地安装了 mya(用于前端代码构建)

$ npm install -g mya
$ npm install -g byted-gulu-cli

使用

新建工程

$ gulu new -h

  Usage: new [options] <project>

  create a new project

  Options:

    -t, --type [type]  project type, 'pure' or 'mixed'. 'pure' for server only project, 'mixed' for project mix client with server (default: mixed)
    -h, --help         output usage information

现在新建工程支持两种类型

  • pure:纯后端工程
  • mixed:前后端混合工程

例如,现在要创建一个纯后端工程,可执行如下命令:

$ gulu new demo --type pure

运行工程

$ gulu run -h

  Usage: run [options] [env]

  run project with optional env: dev(default)/prod/test

  Options:

    -L, --live         livereload
    -H, --hot          hot module replacement
    --verbose          show debug log
    --vconsole         debug with vconsole
    -d, --dest <path>  client release output destination
    -h, --help         output usage information

其中,env应用环境变量中定义的值,默认为 dev

在开发环境下,在项目根目录运行即可:

gulu run -H