This package has been deprecated

Author message:

<please use tappable>

tapable-promise

1.0.1 • Public • Published

CircleCI Codecov npm

tapable-promise

Extends tapable with promise support.

Setup

yarn add tapable-promise 
# or
npm install --save tapable-promise
// Require module
const Tapable = require('tapable-promise')

Usage

For basic usage please see tapable docs.

applyPlugins*

This functions are wrapped with pify and return promise too.

// Using async/await
await this.applyPluginsAsync('init')

// Using Promise
this.applyPluginsAsync('init')
.then(() => {
  // Applied
})
.catch(err => {
  // Some error happened
})

plugin(names, handler)

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

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

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

License

MIT

Package Sidebar

Install

npm i tapable-promise

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • pi0