CDRH / orchid

Rails Engine for site integration with CDRH API
MIT License
3 stars 0 forks source link

Add all vendor/assets/ to manifest.js #296

Open techgique opened 1 year ago

techgique commented 1 year ago

We had to add this to the Whitman Archive Rails app for Mirador, but if we add this to Orchid we won't have to worry about it in future Rails apps and it will include everything inside vendor/assets/ and we won't have to add config lines for each individual package.

Add to Orchid's app/assets/config/manifest.js:

…

// Include all Rails app assets from directories inside /vendor/assets
//= link_tree ../../../vendor/assets

The above should handle all vendor assets for Rails apps which use Orchid. This file will get copied by the generator for new Rails apps, but we'll want to update existing ones with this change after it is made too.

We also want to handle any future vendor assets added to Orchid itself, which requires adding to app/assets/config/orchid/manifest.js:

…
//= link_tree ../../../../vendor/assets

Note that there is already modernizer-custom.js in Orchid's vendor/assets/ but it is working without this because that is requireed by https://github.com/CDRH/orchid/blob/dev/app/assets/javascripts/orchid.js#L11