1.0.0 • Published 5 years ago

eggmsgsession v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

nrm

一、nrm是什么? 这是官方的原话:

  开发的npm registry 管理工具 nrm, 能够查看和切换当前使用的registry。

顾名思义,就是说nrm是一个管理npm的工具。

二、nrm的安装 $ npm install -g nrm

三、nrm命令 $ nrm ls  // 查看所有的支持源(有*号的表示当前所使用的源,以下name表示源的名称)

$ nrm use name  // 将npm下载源切换成指定的源

$ nrm add        // 使用 add 添加仓库

$ nrm del        // 使用 del 可以删除仓库

$ nrm help  // 查看nrm帮助

$ nrm home name  // 跳转到指定源的官网

=============================

egg-msg-flash

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

git remote add origin https://github.com/JackYang3567/-egg-msg-flash.git git push -u origin master

Install

$ npm i egg-msg-flash --save

Usage

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

Configuration

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

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

Example

ctx.flash = {
  type: 'success',
  message: {
    some: 'one'
  }
}

// or

ctx.flash_success({some:'one})

ctx.flash_error()
ctx.flash_info()
ctx.flash_warning()

ctx.request.flash(type, message)

// get flash by

ctx.flash

Questions & Suggestions

Please open an issue here.

License

MIT