fix cleanPipe()

This commit is contained in:
Philipp Kunz 2017-03-04 14:26:10 +01:00
parent 5401e5e008
commit addf20995a
3 changed files with 10 additions and 4 deletions

4
dist/index.d.ts vendored
View File

@ -1,5 +1,7 @@
/// <reference types="q" /> /// <reference types="q" />
/// <reference types="node" />
import * as plugins from './smartstream.plugins'; import * as plugins from './smartstream.plugins';
import { Transform } from 'stream';
export interface IErrorFunction { export interface IErrorFunction {
(err: any): any; (err: any): any;
} }
@ -35,4 +37,4 @@ export declare class Smartstream {
*/ */
run(): plugins.q.Promise<void>; run(): plugins.q.Promise<void>;
} }
export declare let cleanPipe: () => void; export declare let cleanPipe: () => Transform;

4
dist/index.js vendored
View File

@ -73,10 +73,10 @@ class Smartstream {
} }
exports.Smartstream = Smartstream; exports.Smartstream = Smartstream;
exports.cleanPipe = () => { exports.cleanPipe = () => {
plugins.through2.obj((file, enc, cb) => { return plugins.through2.obj((file, enc, cb) => {
cb(); cb();
}, (cb) => { }, (cb) => {
cb(); cb();
}); });
}; };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLGlEQUFnRDtBQWVoRDs7R0FFRztBQUNIO0lBS0U7O09BRUc7SUFDSCxZQUFZLGNBQXFCO1FBUHpCLGdCQUFXLEdBQUcsRUFBRSxDQUFBO1FBQ2hCLDJCQUFzQixHQUF5QixFQUFFLENBQUE7UUFDakQsMEJBQXFCLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtRQU0vQyxJQUFJLENBQUMsV0FBVyxHQUFHLGNBQWMsQ0FBQTtJQUNuQyxDQUFDO0lBRUQ7O09BRUc7SUFDSCxhQUFhO1FBQ1gsTUFBTSxDQUFDLElBQUksQ0FBQyxxQkFBcUIsQ0FBQyxPQ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BQUMsQ0FBQyxDQUFBO1FBQ0YsV0FBVyxDQUFDLEVBQUUsQ0FBQyxPQUFPLEVBQUU7WUFDdEIsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFBO1FBQ2hCLENBQUMsQ0FBQyxDQUFBO1FBQ0YsV0FBVyxDQUFDLEVBQUUsQ0FBQyxRQUFRLEVBQUU7WUFDdkIsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFBO1FBQ2hCLENBQUMsQ0FBQyxDQUFBO1FBQ0YsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUE7SUFDckIsQ0FBQztDQUNGO0FBeEVELGtDQXdFQztBQUVVLFFBQUEsU0FBUyxHQUFHO0lBQ3JCLE1BQU0sQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLEdBQUcsQ0FDekIsQ0FBQyxJQUFJLEVBQUUsR0FBRyxFQUFFLEVBQUU7UUFDWixFQUFFLEVBQUUsQ0FBQTtJQUNOLENBQUMsRUFDRCxDQUFDLEVBQUU7UUFDRCxFQUFFLEVBQUUsQ0FBQTtJQUNOLENBQUMsQ0FDRixDQUFBO0FBQ0gsQ0FBQyxDQUFBIn0=

View File

@ -1,5 +1,9 @@
import * as plugins from './smartstream.plugins' import * as plugins from './smartstream.plugins'
// interfaces
import { Transform } from 'stream'
export interface IErrorFunction { export interface IErrorFunction {
(err): any (err): any
} }
@ -91,7 +95,7 @@ export class Smartstream {
} }
export let cleanPipe = () => { export let cleanPipe = () => {
plugins.through2.obj( return plugins.through2.obj(
(file, enc, cb) => { (file, enc, cb) => {
cb() cb()
}, },