less-rails icon indicating copy to clipboard operation
less-rails copied to clipboard

Can someone explain import and depend_on

Open chaomao opened this issue 8 years ago • 1 comments

Hi, there I read readme a lot of times and still confuse about it, can someone explain it in detail, especially about depend_on? Sorry for my poor english.

Any @import to a .less file will automatically declare that file as a sprockets dependency to the file importing it. This means that you can edit imported framework files and see changes reflected in the parent during development. So this:

@import "frameworks/bootstrap/mixins";

#leftnav { .border-radius(5px); }
Will end up acting as if you had done this below:

/*
 *= depend_on "frameworks/bootstrap/mixins.less"
*/

@import "frameworks/bootstrap/mixins";

#leftnav { .border-radius(5px); }

chaomao avatar May 04 '16 02:05 chaomao

What's more, I found some issue are talking this again and again, could someone update readme and end this discuss. @metaskills, please update readme carefully and clearly, I think it may save a lots of time to explain everyone.

chaomao avatar May 04 '16 03:05 chaomao