{"_id":"tappable","_rev":"1516771","name":"tappable","description":"Tapable with Promise support","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"time":{"modified":"2021-11-10T06:23:31.000Z","created":"2017-06-13T15:10:03.697Z","1.1.0":"2017-07-17T22:04:13.324Z","1.0.1":"2017-06-13T15:10:03.697Z"},"users":{},"author":{"name":"Pooya Parsa","email":"pooya@pi0.ir"},"repository":{"type":"git","url":"git+https://github.com/pi0/tappable.git"},"versions":{"1.1.0":{"name":"tappable","version":"1.1.0","description":"Tapable with Promise support","main":"lib/index.js","directories":{"lib":"lib"},"scripts":{"test":"jest && codecov"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"repository":{"type":"git","url":"git+https://github.com/pi0/tappable.git"},"keywords":["tapable","promise","async","await","webpack","q","co"],"author":{"name":"Pooya Parsa","email":"pooya@pi0.ir"},"license":"MIT","bugs":{"url":"https://github.com/pi0/tappable/issues"},"homepage":"https://github.com/pi0/tappable#readme","dependencies":{"pify":"^3.0.0","tapable":"^0.2.6"},"devDependencies":{"codecov":"^2.2.0","jest":"^20.0.4"},"gitHead":"8bd98632356e612a03cbfe3d6333c6be8f0ac580","_id":"tappable@1.1.0","_npmVersion":"5.2.0","_nodeVersion":"8.1.2","_npmUser":{"name":"pi0","email":"pooya@pi0.ir"},"dist":{"shasum":"521770dea7dc4715d48ddb4c471071afee012025","size":23877,"noattachment":false,"key":"/tappable/-/tappable-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/tappable/download/tappable-1.1.0.tgz"},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tappable-1.1.0.tgz_1500329052323_0.6551228493917733"},"publish_time":1500329053324,"_hasShrinkwrap":false,"_cnpm_publish_time":1500329053324,"deprecated":"please use https://www.npmjs.com/package/hookable"},"1.0.1":{"name":"tappable","version":"1.0.1","description":"Tapable with Promise support","main":"lib/index.js","directories":{"lib":"lib"},"scripts":{"test":"jest && codecov"},"jest":{"coverageDirectory":"./coverage/","collectCoverage":true},"repository":{"type":"git","url":"git+https://github.com/pi0/tappable.git"},"keywords":["tapable","promise","async","await","webpack","q","co"],"author":{"name":"Pooya Parsa","email":"pooya@pi0.ir"},"license":"MIT","bugs":{"url":"https://github.com/pi0/tappable/issues"},"homepage":"https://github.com/pi0/tappable#readme","dependencies":{"pify":"^3.0.0","tapable":"^0.2.6"},"devDependencies":{"codecov":"^2.2.0","jest":"^20.0.4"},"gitHead":"b58b4021ea0b96819a90e3b189fdc5873361e508","_id":"tappable@1.0.1","_npmVersion":"5.0.0","_nodeVersion":"8.0.0","_npmUser":{"name":"pi0","email":"pooya@pi0.ir"},"dist":{"shasum":"9cda1fdeb73011d30db5edc42bc6cc42c9f3028f","size":23882,"noattachment":false,"key":"/tappable/-/tappable-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/tappable/download/tappable-1.0.1.tgz"},"maintainers":[{"name":"pi0","email":"pooya@pi0.ir"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tappable-1.0.1.tgz_1497366602657_0.7417278802022338"},"publish_time":1497366603697,"_hasShrinkwrap":false,"_cnpm_publish_time":1497366603697,"deprecated":"please use https://www.npmjs.com/package/hookable"}},"readme":"[![CircleCI](https://img.shields.io/circleci/project/github/pi0/tappable.svg?style=flat-square)](https://circleci.com/gh/pi0/tappable)\n[![Codecov](https://img.shields.io/codecov/c/github/pi0/tappable.svg?style=flat-square)](https://codecov.io/gh/pi0/tappable)\n[![npm](https://img.shields.io/npm/v/tappable.svg?style=flat-square)](https://www.npmjs.com/package/tappable)\n\n# Tappable\n> [Tapable](https://www.npmjs.com/package/tapable) with promise support.\n\n## Setup\n```bash\nyarn add tappable\n# or\nnpm install --save tappable\n```\n```js\n// Require module\nconst Tapable = require('tappable')\n```\n\n## Usage\nFor basic usage please see [tapable](https://github.com/webpack/tapable) docs.\n\n### `applyPlugins*`\nThis functions are wrapped with [pify](https://www.npmjs.com/package/pify) \nand return promise too.\n\n```js\n// Using async/await\nawait this.applyPluginsAsync('init')\n\n// Using Promise\nthis.applyPluginsAsync('init')\n.then(() => {\n  // Applied\n})\n.catch(err => {\n  // Some error happened\n})\n```\n\n### `plugin(names, handler)`\nWhen register plugins `handler` function can also return promise instead of calling `callback` argument.\n\n```js\nwebpack.plugin('init', async () => {\n  // You can use async/await here  \n})\n\n// or\nwebpack.plugin('init', () => new Promise((resolve, reject) => {\n  // Call resolve() or rejcet() when finished or chain promise\n}))\n```\n\n# License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/pi0/tappable#readme","bugs":{"url":"https://github.com/pi0/tappable/issues"},"license":"MIT"}