10

Ive some very heavy external stylesheets in app/assets/stylesheets/external/calendars I dont want to include the stylesheets into the application.css as they are used infrequently

Yet i want them precompiled.

Ho w do i use config.assets.precompile o selectively precompile all stylesheets nside this folder ?

Mohith Thimmaiah
  • 857
  • 1
  • 9
  • 21

2 Answers2

16

You can simple write it like this:

config.assets.precompile += ['directory1/*', 'directory2/*', 'file.js']

Or use a cleaner syntax like this:

config.assets.precompile += %w( directory1/* directory2/* file.js )
Flavio Wuensche
  • 9,460
  • 1
  • 57
  • 54
11

This is covered in section 4.1 of the Asset Pipeline Rails Guide

config.assets.precompile += ["*external/calendars*"]
doesterr
  • 3,955
  • 19
  • 26