0.0.4 • Published 8 years ago

generator-dogz v0.0.4

Weekly downloads
1
License
-
Repository
-
Last release
8 years ago

A custom Koa generator for Yeoman.

Install

Install with npm.

$ npm install -g yo
$ npm install -g generator-dogz

Make a new directory and cd into it:

$ mkdir new-project && cd $_

Finally, initiate the generator:

$ yo dogz

Start

Requires NodeJS >= v4.2.4

$ sh begin.sh dev (开发环境)
$ sh begin.sh dist(生产环境)

browse

http://localhost:3001

Test

$ npm test

add ad view

$ yo dogz:view

#file structure

├── bin
│   └── www.js      enter point
│   └── config.js   config
│   └── router.js   user custom router
│
├── sys             framework scripts
│   └── app.js      
│   └── log         project log
│   └── middelware  framework needed mw
│   └── gulp-plugin
│
│
├── controllers
│   └── index.js    controller
│
├── resource
│   ├── js
│   │   │── page
│   │   │── cmp
│   │   │── tools
│   │   └── lib
│   └── css
│   │    └── index.css
│   └── less    
│   └── es6         es2015 code 
│   └── es5         compiled code
│
├── service         data mock
│   └── com.a.b 
│
├── test
│   └── routeSpec.js
│
├── views
│   ├── public
│   │       │──head.html
│   │
│   ├── template.html
│   └── index.html
│
├── begin.sh        start project
├── Dockerfile      docker config file
├── gulpfile.js
├── build.js        build es5 js (compress & concat)
└── package.json

See Koa Examples

License

MIT License @ addison