edit this page Directives
Each file with content type
processed by the
the head of these files for special comments starting with an equals
The arguments for each directive are split by the Bourne Shell's rules. This means you have to quote arguments which contain spaces with either single or double quotes.
//= require "some name with spaces.js"
The require directive takes an asset path as argument, processes the asset and puts the dependency's contents before the asset's contents.
The path can also start with
./, which skips the load path for the
path resolution and looks up the file in the same path as the current
Defines that the
path is a dependency of the current asset, but does
not process anything. Assets defined this way get considered when the
last modified time is calculated, but the contents get not prepended.
Requires all files found in the directory specified by
For example, if you have a directory for all individual widgets and a
widget base prototype, then you could
directory. This way every developer can just drop a file into the
widgets/ directory without having to maintain a massive list of
// index.js //= require ./widget_base //= require_tree ./widgets