Managing frontend assets with Bower
This is aimed at developers and applies to the ‘frontend’ application only.
If you wish to add static assets to the core project (i.e., javascript, css,
less files) please use bower
to add and install them so we know what’s what
and when to upgrade.
If you wish to do a good deed for ArchivesSpace you can track down the source of any vendor assets not included in bower.json and get them updated and installed according to this protocol.
General Setup
Step 1: install npm
On OSX, for example:
Step 2: install Bower
Step 3: install components
Adding a static asset to ASpace Frontend (Staff UI)
Step 1: add the component
Step 2: map Bower > Rails
Step 3: Install assets
Step 4: Check assets in
Check the installed assets into Git. We version control bower.json and the installed files, but not the bower_components directory.
Production!
Don’t forget - if you are adding assets that don’t have a .js extension, you need to add them to frontend/config/environments/production.rb