ember-cli / rfcs

Archive of RFCs for changes to ember-cli (for current RFC repo see https://github.com/emberjs/rfcs)
45 stars 54 forks source link

ember-cli should look up for addons in optionalDependencies as well. #105

Closed SharavanaPrasad closed 6 years ago

SharavanaPrasad commented 7 years ago

RFC for the proposal that ember-cli could look up for addons in optionalDependencies as well to include it in consuming application. rendered

SharavanaPrasad commented 7 years ago

cc @kellyselden , kindly guide me through the RFC process.

kellyselden commented 7 years ago

We discussed this in our meeting today. We are 100% on board with discovering addons in optionalDependencies. We will try to require.resolve them relative to the package.json they are in, and if they exist, use them, otherwise continue without failing. The new API in ember-cli-build.js seemed a little unnecessary to us, and would like to continue the RFC without it. Does all this sound good to you @SharavanaPrasad? Would you mind updating the RFC with the above info? Also, we don't anticipate the implementation to be that difficult or require that much code, would you be interested in implementing as well?

SharavanaPrasad commented 7 years ago

@kellyselden Thank you! That sounds exciting!! I am all ready to open a PR for the same. As per the discussion we can work to make ember-cli scan for Optional Dependencies as well and proceed the build even if any of optional dependencies is missing.

@rwjblue , The mail reason I had asked for an API in ember-cli-build.js was to have a control over the environment specific packages I would want to include in ember-cli App. In my opinion since this can be handled at the level of npm install itself (using appropriate flags npm install --no-optional ), I agree to a drop the idea of wanting an API for ember-cli-build.js.

That's Great 👍

SharavanaPrasad commented 7 years ago

I have updated the RFC as per our conclusion. Please check if it's good. Will be pushing a PR for this functionality in a couple of days. // @kellyselden

Turbo87 commented 6 years ago

@SharavanaPrasad sorry that it took us so long, we forgot... 🙈