Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomoat/koa2-generator
Koa2' application generator support ejs|hbs|hjs|jade|pug|twig|vash|nunjucks template engine
https://github.com/tomoat/koa2-generator
generator koa koa2 koa2-generator koajs
Last synced: about 1 month ago
JSON representation
Koa2' application generator support ejs|hbs|hjs|jade|pug|twig|vash|nunjucks template engine
- Host: GitHub
- URL: https://github.com/tomoat/koa2-generator
- Owner: tomoat
- License: mit
- Archived: true
- Created: 2017-03-19T03:13:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-20T07:33:14.000Z (over 2 years ago)
- Last Synced: 2024-09-26T16:40:21.029Z (about 2 months ago)
- Topics: generator, koa, koa2, koa2-generator, koajs
- Language: JavaScript
- Homepage:
- Size: 91.8 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# koa-generator
[Koa'](https://koajs.com) application generator.
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Linux Build][travis-image]][travis-url]
[![Windows Build][appveyor-image]][appveyor-url]
[![Gratipay][gratipay-image]][gratipay-url]
[![Greenkeeper badge][geenkeeper-image]][geenkeeper-url]
## Installation```sh
$ npm install -g koa2-generator
```## Quick Start
The quickest way to get started with koa2 is to utilize the executable `koa2(1)` to generate an application as shown below:
Create the app:
if you use hogan template engine
```bash
$ koa2 --view hogan ./app && cd ./app
```if you want use yarn manage your application modules
```bash
$ npm i -g yarn
```Install dependencies:
```bash
$ npm install
or
$ yarn install
```Start your Koa app at `http://localhost:3000/`:
```bash
$ npm start
or
$ yarn start
```## Command Line Options
This generator can also be further configured with the following command line flags.
Usage: koa2 [options] [dir]
options:
-h, --help output usage information
-v, --version output the version number
-e, --ejs add ejs engine support
--hbs add handlebars engine support
--pug add pug engine support
--hjs add hogan.js engine support
--njk add nunjucks engine support
--view add view support (ejs|hbs|hogan|jade|pug|twig|vash) (defaults to jade)
-c, --css add stylesheet support (less|stylus|compass|sass) (defaults to plain css)
--git add .gitignore
-f, --force force on non-empty directory## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/koa2-generator.svg
[npm-url]: https://npmjs.org/package/koa2-generator
[travis-image]: https://img.shields.io/travis/tomoat/koa2-generator/master.svg?label=linux
[travis-url]: https://travis-ci.org/tomoat/koa2-generator
[appveyor-image]: https://img.shields.io/appveyor/ci/tomoat/koa2-generator/master.svg?label=windows
[appveyor-url]: https://ci.appveyor.com/project/tomoat/koa2-generator
[downloads-image]: https://img.shields.io/npm/dm/koa2-generator.svg
[downloads-url]: https://npmjs.org/package/koa2-generator
[gratipay-image]: https://img.shields.io/gratipay/tomoat.svg
[gratipay-url]: https://gratipay.com/tomoat/
[geenkeeper-image]: https://badges.greenkeeper.io/tomoat/koa2-generator.svg
[geenkeeper-url]: https://greenkeeper.io/