From 2818420ee912c9b88b2c76467f5f595cb540024d Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Wed, 20 Feb 2019 00:40:31 +0100 Subject: [PATCH] fix(docs): update --- README.md | 15 +++++++++++++++ package.json | 2 +- ts/smartstream.plugins.ts | 5 +---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 30ad756..727cd61 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,21 @@ simplifies access to node streams Use TypeScript for best in class instellisense. +```typescript +import { Smartstream } from 'smartstream' +import * as gUglify from 'gulp-uglify' + +let mySmartstream = new Smartstream([ + gulp.src(['./file1.js','./file2.js']), + gUglify(), + gulp.dest('./some/output/path') +]) + +mySmartstream.onError((err) => { /* handle error */ }) // handles all errors in stream +myStream.onCustomEvent('myeventname', (args...) => { /* Do something */ }) // emit an custom event anywhere in your stream +mySmartstream.run().then(() => {/* do something when stream is finished */}) +``` + For further information read the linked docs at the top of this readme. > MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) diff --git a/package.json b/package.json index d78f2d9..dd51494 100644 --- a/package.json +++ b/package.json @@ -31,4 +31,4 @@ "@types/through2": "^2.0.34", "through2": "^3.0.0" } -} +} \ No newline at end of file diff --git a/ts/smartstream.plugins.ts b/ts/smartstream.plugins.ts index bd09503..bddad84 100644 --- a/ts/smartstream.plugins.ts +++ b/ts/smartstream.plugins.ts @@ -1,7 +1,4 @@ import * as smartpromise from '@pushrocks/smartpromise'; import * as through2 from 'through2'; -export { - smartpromise, - through2 -}; +export { smartpromise, through2 };