write

  • function
steal-tools.streams.write  

Create a stream that takes a BuildResult objects and writes them to the filesystem.

stealTools.streams.write()

Returns

{Stream<BuildResult>}

A stream of objects that contains the dependency graph, bundles, and loader used to perform the trace.

Use

The write stream is used to write the result of a build to the filesystem.

var s = require("steal-tools").streams;

var steal = {
    config: __dirname + "/package.json!npm"
};

var stream = s.graph(steal)
    .pipe(s.transpile())
    .pipe(s.minify())
    .pipe(s.bundle())
    .pipe(s.concat())
    .pipe(s.write());

stream.on("data", function(){
    // Files were written to the filesystem
});
Help us improve StealJS by taking our community survey