Description
Currently, angular cli relies entirely on npm for package management. While this is fine in many cases, bower is still widely used. Unfortunately, there is no good solution for using bower-managed packages with the cli.
A workaround mentioned in a different issue suggests configuring the .bowerrc
file to move the bower_components
folder into the public
folder, as its content is then copied to the dist
folder. This works for development, but obviously not in production. You definitely don't want the whole bower_components
in your production build, but instead just pick the css and js so they can be bundled, minified, etc and then injected into your index.html
I know this has been brought up a few times, but still, none of the workarounds presented before are really solutions for a real product where vendor js files and css need to be bundled, rev'ed, minifed, etc.
A few reasons to consider supporting it:
- Many packages are only available on bower;
- Bower is still a very popular frontend package manager, proven to work well;
- It's no doubt the simpler solution when it comes to managing conflicting versions of dependencies and packages (a big deal in the frontend);
- Ember cli is a huge success, entirely based on bower. Which shows bower alone could take care of the frontend dev dependencies. Npm is cool, but full of issues when it comes to frontend yet to be resolved (as elaborated here http://blog.npmjs.org/post/101775448305/npm-and-front-end-packaging).
IMHO skipping bower and relying entirely on npm is not a good move. NPM may become the best package manager for the frontend, but as of right now, for many workflows bower is still needed.
BTW, ng help
lists bower support for the new
and init
commands:
--skip-bower (Boolean) (Default: false)
aliases: -sb
Having it not be skipped on ng new
and ng init
would be fantastic!