You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently got a question in the Ember Community Discord:
can someone explain to me what the difference between index.js and ember-cli-build.js in an addon is?
And here was my answer:
the index.js is the "entry point" for your addon and is where you add hooks if you're doing something intermediate or advanced with your addon. the ember-cli-build.js inside your addon is only used to build the dummy app when developing it locally and has no influence on what happens to the consuming app
It seems to me that as we have been training people that the ember-cli-build.js is the "entry point" to an Ember App it is likely that we will confuse people when they look at an addon. I assume we might be able to add a note to https://cli.emberjs.com/release/writing-addons/#addonfilestructure or somewhere that is explicit about the difference?
The text was updated successfully, but these errors were encountered:
@mansona I can do this; but beforehand, the ember-cli-build.js file for an addon contains the comment:
/*
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/
Can you clarify the meaning of app's build file? Is this the ember-cli-build.js file for the consuming application of the addon?
I recently got a question in the Ember Community Discord:
And here was my answer:
It seems to me that as we have been training people that the
ember-cli-build.js
is the "entry point" to an Ember App it is likely that we will confuse people when they look at an addon. I assume we might be able to add a note to https://cli.emberjs.com/release/writing-addons/#addonfilestructure or somewhere that is explicit about the difference?The text was updated successfully, but these errors were encountered: