wepy-cli

适用于1.7.0之后的版本

安装 (Installation)

  1. npm install -g wepy-cli
  2. wepy init standard my-project

使用 (Usage)

  1. Commands:
  2. init [options] <template-name> [project-name] generate a new project from a template
  3. build [options] build your project
  4. list [options] list available official templates
  5. upgrade [options] upgrade to the latest version

拉取模板 (Pulling Templates)

  1. Usage: init <template-name> [project-name]
  2. generate a new project from a template
  3. Options:
  4. -c --clone use git clone
  5. --offline use cached template
  6. -h, --help output usage information
  7. Example:
  8. # create a new project with an official template
  9. $ wepy init standard my-project
  10. # create a new project straight from a github template
  11. $ wepy init username/repo my-project

image

查找官方/第三方模板资源

  1. Usage: list [options]
  2. list available official templates
  3. Options:
  4. -g, --github list all registered github projects
  5. -h, --help output usage information

image

编译

  1. Usage: build [options]
  2. build your project
  3. Options:
  4. -f, --file <file> 待编译wpy文件
  5. -s, --source <source> 源码目录
  6. -t, --target <target> 生成代码目录
  7. -o, --output <type> 编译类型:webweapp。默认为weapp
  8. -p, --platform <type> 编译平台:browser, wechatqq。默认为browser
  9. -w, --watch 监听文件改动
  10. --no-cache 对于引用到的文件,即使无改动也会再次编译
  11. -h, --help output usage information

升级wepy-cli

  1. Usage: upgrade [options]
  2. upgrade to the latest version
  3. Options:
  4. --cli upgrade wepy-cli
  5. --wepy upgrade wepy
  6. -h, --help output usage information