smartstream/docs/index.md
2017-07-07 02:46:20 +02:00

2.7 KiB

smartstream

simplifies access to node streams, TypeScript ready!

Availabililty

npm git git docs

Status for master

build status coverage report npm downloads per month Dependency Status bitHound Dependencies bitHound Code TypeScript node JavaScript Style Guide

Usage

Use TypeScript for best in class instellisense.

Usage

We recommend the use of TypeScript for best in class intellisense support.

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 | By using this npm module you agree to our privacy policy

repo-footer