Skip to content
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

Have Brocfile.js export a function #386

Merged
merged 2 commits into from
Feb 16, 2019
Merged

Have Brocfile.js export a function #386

merged 2 commits into from
Feb 16, 2019

Conversation

oligriffiths
Copy link
Contributor

@oligriffiths oligriffiths commented Feb 15, 2019

This PR implements the basics needed for Brocfile to return a function by default, and wrap existing brocfile exports in a function for backwards compatibility.
The intention for this is to make Broccoli work the same as Ember-CLI (to avoid confusion), and it also paves the way for us to pass in a configuration object containing things like environment and other build-time useful info (as Ember-CLI does).

One thing to note, is

broccoli/lib/index.js

Lines 7 to 9 in b5e4c8b

get loadBrocfile() {
return require('./load_brocfile');
},
would now return a function rather than a node. This obviously changes the API, but I don't know if that's an issue or not given there was no test for this else it would have failed.

Copy link
Contributor

@stefanpenner stefanpenner left a comment

Choose a reason for hiding this comment

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

Lgtm

@oligriffiths oligriffiths merged commit d7375be into master Feb 16, 2019
@oligriffiths
Copy link
Contributor Author

Dope. Thanks guys

@oligriffiths oligriffiths deleted the export-function branch February 16, 2019 02:48
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.

3 participants