码迷,mamicode.com
首页 > 其他好文 > 详细

Dawn 简单使用

时间:2017-11-04 00:17:46      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:reference   git   amp   run   dex   common   ons   develop   height   

 1. install
npm install dawn -g
2. create project
# 1. Create & Initialize
$ dn init -t front

# 2. Development & Real-time compilation
$ dn dev

# 3. Lint & Test
$ dn test

# 4. Build & pack
$ dn build

// project structure
.
├── node_modules
│   ├── dn-middleware-pkginfo -> _dn-middleware-pkginfo@1.0.3@dn-middleware-pkginfo
│   └── _dn-middleware-pkginfo@1.0.3@dn-middleware-pkginfo
│       ├── lib
│       │   └── index.js
│       ├── package.json
│       └── README.md
├── package.json
├── README.md
├── server.yml
├── src
│   ├── assets
│   │   ├── banner.png
│   │   ├── common.less
│   │   ├── index.html
│   │   └── index.less
│   └── index.js
├── test
│   └── unit
│       └── demo.js
└── tsconfig.json
 
3. help 
Commands:
  i, init           Initialize a dawn project
  a, add            Adding project resources 
  d, dev            Start dev server and build in real-time
  t, test           Perform static code checking and testing
  b, build          Build current project
  p, publish        Publish current project to target environment
  r, run            Run a command
  u, update         Update remote configs and dependent modules
  c, config         Configure the preferences 
     template       Display template list
     middleware     Display middleware list

Options:
  -t, --template    Specify the template name for the init command
  -e, --env         Specify environment variables for all commands
  -v, --version     Display the current version of CLI
  -h, --help        Display cli help information

Examples:

  # Create a project
  mkdir demo && cd demo
  dn init

  # Build a project
  dn build
4. docs
https://github.com/alibaba/dawn

Dawn 简单使用

标签:reference   git   amp   run   dex   common   ons   develop   height   

原文地址:http://www.cnblogs.com/rongfengliang/p/7780752.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!