I have a bunch of CSS files and a bunch of JS files. For development, I’m requiring them all in an all.css
and all.js
and adding <%= stylesheet_link_tag 'all' %>
and <%= javascript_link_tag 'all' %>
in my layout.
When I build, I am seeing that build/javascripts/
and build/stylesheets
have not only concatenated and minified all the files in all.js
and all.css
, but it has built all the other files individually as well! That seems fine because build/index.html
is only including the all
files, but I am wondering if this is the correct way to build?
My config.rb looks like this:
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images'
# Build-specific configuration
configure :build do
# For example, change the Compass output style for deployment
activate :minify_css
# Minify Javascript on build
activate :minify_javascript
# Enable cache buster
activate :asset_hash
# Use relative URLs
activate :relative_assets
end