|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
854 bytes
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
|---|
| 3 | Author Tobias Koppers @sokra
|
|---|
| 4 | */
|
|---|
| 5 | "use strict";
|
|---|
| 6 |
|
|---|
| 7 | const Hook = require("./Hook");
|
|---|
| 8 | const HookCodeFactory = require("./HookCodeFactory");
|
|---|
| 9 |
|
|---|
| 10 | class AsyncSeriesHookCodeFactory extends HookCodeFactory {
|
|---|
| 11 | content({ onError, onDone }) {
|
|---|
| 12 | return this.callTapsSeries({
|
|---|
| 13 | onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true),
|
|---|
| 14 | onDone
|
|---|
| 15 | });
|
|---|
| 16 | }
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | const factory = new AsyncSeriesHookCodeFactory();
|
|---|
| 20 |
|
|---|
| 21 | function COMPILE(options) {
|
|---|
| 22 | factory.setup(this, options);
|
|---|
| 23 | return factory.create(options);
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | function AsyncSeriesHook(args = [], name = undefined) {
|
|---|
| 27 | const hook = new Hook(args, name);
|
|---|
| 28 | hook.constructor = AsyncSeriesHook;
|
|---|
| 29 | hook.compile = COMPILE;
|
|---|
| 30 | hook._call = undefined;
|
|---|
| 31 | hook.call = undefined;
|
|---|
| 32 | return hook;
|
|---|
| 33 | }
|
|---|
| 34 |
|
|---|
| 35 | AsyncSeriesHook.prototype = null;
|
|---|
| 36 |
|
|---|
| 37 | module.exports = AsyncSeriesHook;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.