nuxt/tappable

Name: tappable

Owner: NUXT

Description: Tapable with promise support

Created: 2017-06-13 11:35:38.0

Updated: 2017-12-18 09:03:48.0

Pushed: 2017-07-17 22:04:40.0

Homepage:

Size: 33

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

CircleCI Codecov npm

Tappable

Tapable with promise support.

Setup
 add tappable

install --save tappable
equire module
t Tapable = require('tappable')
Usage

For basic usage please see tapable docs.

applyPlugins*

This functions are wrapped with pify and return promise too.

sing async/await
t this.applyPluginsAsync('init')

sing Promise
.applyPluginsAsync('init')
n(() => {
 Applied

ch(err => {
 Some error happened

plugin(names, handler)

When register plugins handler function can also return promise instead of calling callback argument.

ack.plugin('init', async () => {
 You can use async/await here  


r
ack.plugin('init', () => new Promise((resolve, reject) => {
 Call resolve() or rejcet() when finished or chain promise

License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.