HITS-SDBV / nmtrypi-seek

Other
0 stars 1 forks source link

use https://rails-assets.org for javascript dependencies #3

Open nwoetzel opened 8 years ago

nwoetzel commented 8 years ago

here is a nice overview on how one can manage javascript dependencies in rails: https://www.codefellows.org/blog/5-ways-to-manage-front-end-assets-in-rails Currently, it is done by adding gems, where there are such available; if there is no gem available, they are copied into app/assets Assets that are copied are currently and could be handled in the Gemfile like:

# javascript assets from https://rails-assets.org
gem 'bundler', '>= 1.8.4'
source 'https://rails-assets.org' do
  gem 'rails-assets-bxSlider', '~> 4.1.1'
  gem 'rails-assets-cytoscape', '~> 2.0.0'
  gem 'rails-assets-underscore', '~> 1.8.3'
end
nwoetzel commented 7 years ago

for the datatables.net javascript library, this is already done:

# javascript assets from https://rails-assets.org
gem 'bundler', '>= 1.8.4'
source 'https://rails-assets.org' do
  gem 'rails-assets-datatables.net-jqui', '~> 1.10.0'
  gem 'rails-assets-datatables.net-buttons-jqui', '~> 1.2.0'
end
nwoetzel commented 7 years ago

added also

  gem 'rails-assets-bxslider-4', '~> 4.1.0'
  gem 'rails-assets-underscore', '~> 1.8.3'
nwoetzel commented 7 years ago

Not all dependencies are available as bower packages, e.g. JSME. Currently, it is part of the repository and will need to be updated in here. There is one solution I have found, that can download almost anything: https://github.com/3ofcoins/vendorificator This could be a better alternative compared to adding things to the repository