npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

generator-easy-koa

v0.1.6

Published

a generator for a koa

Downloads

10

Readme

generator-easy-koa NPM version Build Status Dependency Status Coverage percentage

a generator for a koa

Installation

First, install Yeoman and generator-easy-koa using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-easy-koa

Then generate your new project:

yo easy-koa   一键生成可配置项目
yo easy-koa:controller controllerName  一键生成controller

项目相关依赖

dependencies

1. koa-bodyparser
2. koa-compose
3. koa-router
4. koa-static
5. koa-swig
6. mini-logger
7. mongodb
8. mongoose
9. mysql
10. canvas-prebuilt
11. co
...

devDependencies

1. cross-env
2. gulp
3. jsdoc
4. mocha
5. should
6. supertest
7. supervisor
8. chalk
9. babel-polyfill
10.babel-preset-env

##生成项目结构

.
├── bin                                         // 启动文件
├── config                                      // 项目环境配置
│   ├── index                                   // 入口
│   ├── env                                     // 根据运行环境自动加载相应环境的变量
│   │   ├── common                              // 公共配置项
│   │   ├── development.js                      // 开发环境配置项
│   │   ├── production.js                       // 生产环境配置项                                               │   │   └── test.js                             // 测试环境配置项
├── dist                                        // 上线项目文件
├── docs                                        // jsdoc注释自动生成文档
├── src                                         // 源码目录
│   ├── controller                              // controller
│   │   ├── user                                // usercontroller
│   │   │   ├── controller.js                   // 
│   │   │   └── router.js                       // 单元controller
│   │   ├── image                               // imagecontroller
│   │   │   ├── controller.js                   // 
│   │   │   └── router.js                       // msite和shop页面的餐馆列表公共组件
│   │   └── index.js                            // 导出controller server自动注入controller
│   ├── db                                      //
│   │   └── index.js                            // 数据库连接
│   ├── log                                     // 错误日志存放
│   │   └── 2018-xx-xx-err-r.log                //
│   ├── middleware                              //中间件
│   │   ├── logger-async.js                     // log中间件
│   │   └── error.js                            // error中间件
│   ├── models                                  // models
│   │   └── user.js                             // user模型
│   ├── prototype                               // 可以继承的原型
│   │   ├── Base.js                             // 通用类方法
│   │   └── Canvas.js                           // canvas类
│   ├── views                                   // 视图层
│   │   ├── index.html                          // 
│   │   └── user.html                           // 
├── test                                        // 测试文件
│   └── index.spec.js                           
├── .babelrc   
├── Dockerfile                                    
├── .gitignore                                   
├── .gulpfile                                   
├── .index                                     
├── package.json                                    
├── package-lock.json  
└── README.md                                  

项目生成器

地址项目生成器

License

MIT © wangmeng