Dawn 简单使用

Posted rongfengliang-荣锋亮

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Dawn 简单使用相关的知识,希望对你有一定的参考价值。

 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 -> [email protected]@dn-middleware-pkginfo
│   └── [email protected]@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 简单使用的主要内容,如果未能解决你的问题,请参考以下文章

[NIO]dawn之Task具体解释

Dawn 阿里开源前端开发构建工具

EOS Dawn 3.0 智能合约 -- 新格式

[nio]dawn的基本概念

开源DAWN,Spark和Mesos后Stanford的又一力作

javascript DAWN JS更新了