sonalkr132
sonalkr132

Reputation: 1037

sass shows everything in one file

Doc of rails-sass says that one should not use require_tree but use things like @import "mixins/**/*

import puts everything in one file. For ex my application.css looks like:

@import 'markdown';
@import 'issues';
@import 'button';
@import 'comment';
@import 'feed';
@import 'form';
@import 'guide';
@import 'hero';
@import 'map';
@import 'message';
@import 'nav';
@import 'project';
@import 'toolbar';
@import 'user';
@import 'widget';

this generates a 1000 lines application.css file and it gets really difficult to see in debugger where is a particular style is coming from. Everything says it is coming from application.css.

Is there a way I can get back that one feature of require tree .?

Upvotes: 1

Views: 29

Answers (1)

errata
errata

Reputation: 26812

That is the desired behavior for production but in development you probably want to add

config.assets.debug = true

to development.rb. This will cause the file to be compiled separately.

Upvotes: 1

Related Questions