concat

  • function
steal-tools.streams.concat  

Create a stream of BuildResult objects.

stealTools.streams.concat()

Returns

{Stream<BuildResult>}

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

Use

The concat stream is used to concatenate the source code from a bundle and (optionally) create source maps.

This API must be used in conjuction with [steal-tools.streams.transpileAndBundle].

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

var graphStream = s.graph({
    config: __dirname + "/package.json!npm"
}, {
    minify: false
});

var buildStream = graphStream
    .pipe(s.transpile())
    .pipe(s.bundle());

var concatStream = buildStream.pipe(s.concat());

concatStream.on("data", function(data){
    var bundle = data.bundles[0];
    assert(bundle.source, "The source was concatenated");
});
Help us improve StealJS by taking our community survey