Using bower to manage frontend deps


#1

With #7577, we’ll be replacing the rails-assets.org service, which was previously used to pull frontend dependencies as gems, by bower. Please note, that this change has no bearing on the use of the Rails Asset Pipeline, the files go through the pipeline same as before, only come from a different source.

  • to install a new dependency (using c3 as an example JS library), use bower install --save c3

  • to download new dependencies after a git pull, please use bin/update (which handles bundler, bower, and migrations), however, bower install will do if you really want to update only these

  • the actual files get downloaded under vendor/assets/bower_components, which is gitignored, and added to config.assets.paths

  • to install a new purely-devel dependency, use bower install --save-dev c3 (but don’t, as we never call bower install -p)


If you don’t have bower installed, the usual way of installing bower is via npm: npm install -g bower (or sudo npm install -g bower). If you don’t have npm: brew install node (on MacOS X) or dnf install npm (Fedora) or apt install npm (Debian)


#2

Bump… #7577 has been merged


#3

@himdel are those instructions need to be updated in the developer documentation? (if yes, pls add there)
http://manageiq.org/documentation/development/developer_setup/


#4

@abonas pretty sure that’s already handled by https://github.com/ManageIQ/guides/pull/121 and https://github.com/ManageIQ/guides/pull/122 and https://github.com/ManageIQ/guides/pull/123 :slight_smile: