pon-task-seed
Pon task to generate data seed
Last updated 2 months ago by realglobe .
Apache-2.0 · Repository · Bugs · Original npm · Tarball
$ cnpm install pon-task-seed 
SYNC missed versions from official npm registry.

pon-task-seed

Build Status npm Version JS Standard

Pon task to generate data seed

Installation

$ npm install pon-task-seed --save

Usage

'use strict'

const pon = require('pon')
const ponTaskSeed = require('pon-task-seed')

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

  run('db:seed')
}

tryExample()

Signatures

define(db, pattern, options) -> function

Define task

Param type Description
db function|ClayLump DB instance or it's creator
pattern string Filename pattern
options Object Optional settings
options.env string Env to resolve
options.resolver function Resolver for resource name

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 (1)

Copyright 2014 - 2016 © taobao.org |