I am using rails/sprockets to manage my asset pipeline and bower to manage my assets.
When I run the following code to precompile my assets, all assets within the vendor/assets/bower_components get minified.
RAILS_ENV=production rake assets:precompile
Is it possible to only minify and concatenate the files specified in the application.js and application.css files along with the pictures and fonts?
In application.rb, I have the following lines:
config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.ico)
config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components', 'bootstrap-sass-official', 'assets', 'fonts')
config.assets.precompile << %r(.*.(?:eot|svg|ttf|woff)$)
config.assets.precompile = ['*.js', '*.css', '*.css.erb']
The biggest issue is that sprockets tries to precompile all assets including bootstrap-sass-official which I do not use and in doing so I get the following error:
Sass::SyntaxError: Undefined variable: "$alert-padding".
(/vendor/assets/bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap/_alerts.scss:10)
I didn't even change the _alerts.scss file.