1.1.1 • Published 6 years ago

egg-colors v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

egg-colors

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-colors --save

Usage

// {app_root}/config/plugin.js
exports.colors = {
  enable: true,
  package: 'egg-colors',
};

Configuration

// {app_root}/config/config.default.js
exports.colors = {
};

see config/config.default.js for more detail.

Example

# controller/home.js

'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    await ctx.red('1111111111');
    // await ctx.balck('123456');
		// await ctx.red('123456');
		// await ctx.green('123456');
		// await ctx.yellow('123456');
		// await ctx.blue('123456');
		// await ctx.magenta('123456');
		// await ctx.cyan('123456');
		// await ctx.white('123456');
		// await ctx.gray('123456');
		// await ctx.grey('123456');
    ctx.body = 'text';
  }
}

module.exports = HomeController;

Questions & Suggestions

Please open an issue here.

License

MIT

1.1.1

6 years ago

1.1.0

6 years ago

1.0.9

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago