Closed akatov closed 8 years ago
Hi,
yes, definitely! I'm always in favour of not polluting the global namespace.
Unfortunately, I won't have any time to contribute to this at the moment. If you want to go ahead, I'll happily merge it once it's done!
well, this is not really a fix for the pollution of the global namespace, but it does get rid of a bower dependency and the user doesn't have to run a generate
any more.
+1
@lawitschka are you happy with #5 ?
Why exactly use NPM instead of Bower then? I see the point in avoiding global namespace pollution and creating a Shim for that makes sense, but why like that?
P.S.: The user does not have to generate
because ember install
already takes care of that :)
yes, but only one file changes (package.json
) rather than two (package.json
and bower.json
).
also, my bet is on npm becoming more widely adopted in the coming years for front-end package distribution (especially with wider adoption of ES6), and all other package managers slowly but surely dying off...
Don't get me wrong, I don't like Bower either, but since Ember.js encourages the use of Bower for frontend libraries, I used it.
However, I agree with you that (hopefully) NPM will become the standard and therefore I merged the change.
would you consider a pull request which got rid of bower along the lines of ember-cli-moment-shim (see https://github.com/jasonmit/ember-cli-moment-shim/blob/master/index.js) The idea is to import the front-end dependency as an npm dependency, then use
require.resolve
to look up the path in ember-cli-build.