Skip to content

How to: precompile assets

Bruno P. Kinoshita edited this page Sep 9, 2021 · 1 revision

If you are using Smashing 1.3.6+, you should have a Rakefile included when you create a new dashboard with smashing new $name. Otherwise, you should be able to copy this file into your existing workflows.

This file was introduced in 1.3.6 and contains just one task to precompile assets. It uses sprockets to precompile the assets. In 1.3.6 it only precompiled application.js, but you should be able to customize it or request for other resources to be included too (e.g. CSS).

This is useful when you want to run your dashboards in an environment with limited resources, or when starting your dashboard is taking too long when it is generating the application.js on the fly (default behaviour of sprockets).

Usage:

rake precompile-assets
Clone this wiki locally