pon-task-db
DB task set for pon
Last updated 3 months ago by realglobe .
Apache-2.0 · Repository · Bugs · Original npm · Tarball
$ cnpm install pon-task-db 
SYNC missed versions from official npm registry.

pon-task-db

Build Status npm Version JS Standard

DB task set for pon

Installation

$ npm install pon-task-db --save

Usage

'use strict'

const pon = require('pon')
const { seed } = require('pon-task-db')

async function tryExample () {
  let run = pon({
    'db:seed': seed(() => {/*...*/}, 'db/seeds/:env/*.seed.json')
  })

  run('db:seed')
}

tryExample()

Signatures

define(options) -> function

Define task

Param type Description
options Object Optional settings

drop(db, options) -> function

Define task to drop database

Param type Description
db function|ClayLump DB instance or it's creator
options Object Optional settings
options.unless string NODE_ENV to skip

setup(db, options) -> function

Define task to setup database

Param type Description
db function|ClayLump DB instance or it's creator
options Object Optional settings

License

This software is released under the Apache-2.0 License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (15)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |