我有我的主应用程序 css,我想排除我的后端样式表,因为当 application.css 执行时样式都会溢出*=require_tree .
我目前的文件夹设置如下:
assets/
stylesheets/
main/ #application.css ##other css files for front end
backend/ #backend.css ##other css files for back end
我的 application.css 如下:
/*
*= require_self
*= require foundation_and_overrides
*= require_tree ./main/
*/
后端.css
/*
*= require_self
*= require foundation_and_overrides
*= require_tree ./backend/
*/
在我的 application.rb
config.assets.precompile += ['application.css', 'backend.css']
我的发展.rb
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations
config.active_record.migration_error = :page_load
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
我尝试移动样式表并使用不同的目录,但是我要么根本不加载样式表,要么会收到“找不到foundation_and_overrides”...
有没有一种简单干净的方法来做到这一点?我只想从 application.css 编译中排除几个样式表