krainboltgreene
krainboltgreene

Reputation: 1861

How do I get assets to compile to their own files AND into the application.js file?

Alright so lets say I have these files in vendor/assets/javascript/:

And these files in app/assets/javascript/:

I would like to have lightbox.js, highchart.js and modernizer.js all compiled into seperate files. Here's an example in public/assets/:

I'm using Rails 3.1.3, Ruby 1.9.3 (Not that this matters).

Upvotes: 2

Views: 224

Answers (1)

Frederick Cheung
Frederick Cheung

Reputation: 84152

Add them to the list of assets to precompile by sticking this in application.rb

config.assets.precompile += ['lightbox.js', 'highchart.js', 'modernizer.js']

Upvotes: 1

Related Questions