Skip to content

Add broccoli-conditional-debug and begin instrumenting.#407

Merged
trentmwillis merged 1 commit into
ember-engines:masterfrom
rwjblue:add-conditional-debuggers
May 6, 2017
Merged

Add broccoli-conditional-debug and begin instrumenting.#407
trentmwillis merged 1 commit into
ember-engines:masterfrom
rwjblue:add-conditional-debuggers

Conversation

@rwjblue
Copy link
Copy Markdown
Member

@rwjblue rwjblue commented May 5, 2017

Adds broccoli-conditional-debug as a dependency and begins instrumenting the styles portions of the build.

Once this lands, we can run a build like:

BROCCOLI_DEBUG=ember-engines:* ember b

And the instrumented trees are copied into ./DEBUG/ subfolder so that you can easily inspect them:

ember-engines:eager-in-eager:engine-style:input
ember-engines:eager-in-eager:styles
ember-engines:eager-in-lazy-in-lazy:engine-style:input
ember-engines:eager-in-lazy-in-lazy:styles
ember-engines:eager-in-lazy:engine-style:input
ember-engines:eager-in-lazy:styles
ember-engines:eager:engine-style:input
ember-engines:eager:styles
ember-engines:lazy-in-eager:engine-style:input
ember-engines:lazy-in-eager:engine-style:output
ember-engines:lazy-in-eager:engine-style:postprocessed
ember-engines:lazy-in-eager:styles
ember-engines:lazy-in-eager:vendor-style:input
ember-engines:lazy-in-eager:vendor-style:pre-import
ember-engines:lazy-in-lazy:engine-style:input
ember-engines:lazy-in-lazy:engine-style:output
ember-engines:lazy-in-lazy:engine-style:postprocessed
ember-engines:lazy-in-lazy:styles
ember-engines:lazy-in-lazy:vendor-style:input
ember-engines:lazy-in-lazy:vendor-style:pre-import
ember-engines:lazy:engine-style:input
ember-engines:lazy:engine-style:output
ember-engines:lazy:engine-style:postprocessed
ember-engines:lazy:styles
ember-engines:lazy:vendor-style:input
ember-engines:lazy:vendor-style:pre-import
ember-engines:tree-invocation-order:engine-style:input
ember-engines:tree-invocation-order:engine-style:output
ember-engines:tree-invocation-order:engine-style:postprocessed
ember-engines:tree-invocation-order:styles
ember-engines:tree-invocation-order:vendor-style:input
ember-engines:tree-invocation-order:vendor-style:pre-import

To only debug a single engine, you could run:

BROCCOLI_DEBUG=ember-engines:<engine name here>:* ember b

Which would output:

ember-engines:lazy-in-lazy:engine-style:input
ember-engines:lazy-in-lazy:engine-style:output
ember-engines:lazy-in-lazy:engine-style:postprocessed
ember-engines:lazy-in-lazy:styles
ember-engines:lazy-in-lazy:vendor-style:input
ember-engines:lazy-in-lazy:vendor-style:pre-import

Copy link
Copy Markdown
Contributor

@trentmwillis trentmwillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One smallish thing, but overall I like it!

Comment thread lib/engine-addon.js Outdated
exclude: ['vendor/**/*.*']
});

return new BroccoliDebug(vendorCSSTree, this._debugLabel + ':vendor-style:input');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestion: Can we create a helper function for constructing these labels? Maybe something like this._debugLabel('vendor-style:input'); and change the current _debugLabel to be _debugLabelPrefix or something?

It's not 100% necessary, but I feel it would be nicer and makes maintainability better in the long run (e.g. if we want to change the format or the labels).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I actually built something into broccoli-conditional-debug for this in https://github.com/rwjblue/broccoli-conditional-debug/pull/1.

@rwjblue rwjblue force-pushed the add-conditional-debuggers branch from 06d23d7 to 432d8bc Compare May 6, 2017 14:45
Adds [broccoli-conditional-debug](https://github.com/rwjblue/broccoli-conditional-debug)
as a dependency and begins instrumenting the styles portions of the build.

Once this lands, we can run a build like:

```
BROCCOLI_DEBUG=ember-engines:* ember b
```

And the instrumented trees are copied into `./DEBUG/` subfolder so that you can easily
inspect them.
@rwjblue rwjblue force-pushed the add-conditional-debuggers branch from 432d8bc to 09d5bed Compare May 6, 2017 15:22
@rwjblue
Copy link
Copy Markdown
Member Author

rwjblue commented May 6, 2017

@trentmwillis - Ready for another look when you have time...

@trentmwillis trentmwillis merged commit 739afb6 into ember-engines:master May 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants