package
Enable easy debugging of broccoli pipelines with broccoli-debug!
npm install broccoli-debugGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 28 packages.
2.4 MB
Includes dependencies.
6 direct · 3 outdated
^1.2.2
2.1.0
^0.2.1
0.2.6
^0.5.2
2.0.1
^1.2.1
6.0.0
^1.1.8
1.3.1
^0.1.7
0.1.10
Utility for build pipeline authors to allow trivial debugging of the Broccoli pipelines they author.
Heavily inspired by @stefanpenner's
broccoli-stew's debug's helper,
but improved in a few ways:
.png's as utf8 text).To allow consumers to debug the internals of various stages in your build pipeline,
you create a new instance of BroccoliDebug and return it instead.
Something like this:
var BroccoliDebug = require('broccoli-debug');
let tree = new BroccoliDebug(input, `ember-engines:${this.name}:addon-input`);Obviously, this would get quite verbose to do many times, so we have created a shortcut to easily create a number of debug trees with a shared prefix:
let debugTree = BroccoliDebug.buildDebugCallback(`ember-engines:${this.name}`);
let tree1 = debugTree(input1, 'addon-input');
// tree1.debugLabel => 'ember-engines:<some-name>:addon-input'
let tree2 = debugTree(input2, 'addon-output');
// tree2.debugLabel => 'ember-engines:<some-name>:addon-outputFolks wanting to inspect the state of the build pipeline at that stage, would do the following:
BROCCOLI_DEBUG=ember-engines:* ember bNow you can take a look at the state of that input tree by:
ls DEBUG/ember-engines/*interface BroccoliDebugOptions {
/**
The label to use for the debug folder. By default, will be placed in `DEBUG/*`.
*/
label: string
/**
The base directory to place the input node contents when debugging is enabled.
Chooses the default in this order:
* `process.env.BROCCOLI_DEBUG_PATH`
* `path.join(process.cwd(), 'DEBUG')`
*/
baseDir: string
/**
Should the tree be "always on" for debugging? This is akin to `debugger`, its very
useful while actively working on a build pipeline, but is likely something you would
remove before publishing.
*/
force?: boolean
}
class BroccoliDebug {
/**
Builds a callback function for easily generating `BroccoliDebug` instances
git clone git@github.com:broccolijs/broccoli-debug.gitcd broccoli-debugyarnyarn testrwjblue
me@rwjblue.com