New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc Updates #154

Merged
merged 4 commits into from Jun 1, 2017

Conversation

Projects
None yet
3 participants
@rwjblue
Copy link
Member

rwjblue commented Jun 1, 2017

  • Update README to be less confusing about addon usage.
  • Update babel-plugin-debug-macros to latest version, and configure properly so that assertion predicates can be checked prior to assertion message generation.
  • Add broccoli-debug tooling (enables debugging input and output tree's via BROCCOLI_DEBUG=ember-cli-babel:* ember b).
  • Provide useful annotation to underlying broccoli-babel-transpiler. Prior to this all instrumentation just says Babel, now it will say Babel: parent-addon-name.

Fixes #146

README.md Outdated
};
// create the babel options to use elsewhere based on the config above
let options = addon.buildBabelOptions(config)

This comment has been minimized.

@stefanpenner

stefanpenner Jun 1, 2017

Member

where is options used? My guess is config on 97 should be this?

This comment has been minimized.

@rwjblue

rwjblue Jun 1, 2017

Author Member

I'm mostly trying to show that you can build options and do something with it yourself (e.g. call your own require('babel-core').transform or something. Not really that the two examples have anything to do with each other.

This comment has been minimized.

@stefanpenner

stefanpenner Jun 1, 2017

Member

its a tad confusing, as they appear to be the same example (atleast to someone not familiar)

This comment has been minimized.

@rwjblue

rwjblue Jun 1, 2017

Author Member

yeah, I totally see what you mean, I'll try to rework it

@@ -497,6 +497,33 @@ describe('ember-cli-babel', function() {
describe('buildBabelOptions', function() {
this.timeout(20000);

it('provides an annotation including parent name - addon', function() {
this.addon.parent = {
name: 'derpy-herpy'

This comment has been minimized.

@stefanpenner

stefanpenner Jun 1, 2017

Member

such herp derp

index.js Outdated
},

transpileTree(inputTree, config) {
let description = (`000` + (++count)).slice(-3);

This comment has been minimized.

@stefanpenner

stefanpenner Jun 1, 2017

Member

such left-pad?

This comment has been minimized.

@rwjblue

rwjblue Jun 1, 2017

Author Member

haha, indeed. thought about doing something smarter, but this seemed simple and I can't imagine the level of trollage if I actually add a new leftpad dependency 😝

This comment has been minimized.

@stefanpenner

stefanpenner Jun 1, 2017

Member

either is fine

@rwjblue rwjblue force-pushed the rwjblue:provide-annotation-to-babel-transpiler branch from 7ee8d2f to 8af4bdb Jun 1, 2017

@rwjblue

This comment has been minimized.

Copy link
Member Author

rwjblue commented Jun 1, 2017

@stefanpenner - OK, I refactored the heck out of the README to try to make the info actually useful. Let me know what you think...

rwjblue added some commits Jun 1, 2017

Add convienient broccoli debug tooling.
Allows easy debuging of input/output of babel trees via:

```js
BROCCOLI_DEBUG=ember-cli-babel:* ember b
```
Update babel-plugin-debug-macros to avoid message building when test …
…passes.

Updates to latest babel-plugin-debug-macros version which places the
predicate before the assertion in order to avoid costly assertion
message building for no reason (i.e. the assertion passed).
Refactor README.
* Add explicit interfaces for configuration.
* Add explicit interfaces for public API's.
* Add examples for public API's (with some additional reasoning as
  why you would want to use them).

@rwjblue rwjblue force-pushed the rwjblue:provide-annotation-to-babel-transpiler branch from 8af4bdb to 465353d Jun 1, 2017

@rwjblue rwjblue merged commit 6e8bc39 into babel:master Jun 1, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rwjblue rwjblue deleted the rwjblue:provide-annotation-to-babel-transpiler branch Jun 1, 2017

@Turbo87 Turbo87 added the enhancement label Oct 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment