I am trying to convert an existing app to the new 3.1 asset pipeline layout, and want to include a lot of vendor files that have to be in a specific order, (underscore.js an
You have two possible structure : the first one and the second one.
With both following examples, you expose a package at /assets/externals.js.
You can javascript_include_tag this package, but you can also require it in your application.js file.
vendor/
├── assets
│ ├── javascripts
│ │ ├── externals.js
│ │ ├── modernizr-1.7.js
│ │ └── underscore-1.1.6.js
│ └── stylesheets
└── plugins
The file externals.js contains :
//= require ./underscore-1.1.6.js
//= require ./modernizr-1.7.js
vendor/
├── assets
│ ├── javascripts
│ │ └── externals
│ │ ├── index.js
│ │ ├── modernizr-1.7.js
│ │ └── underscore-1.1.6.js
│ └── stylesheets
└── plugins
The file index.js contains :
//= require ./underscore-1.1.6.js
//= require ./modernizr-1.7.js