petebrowne / sprockets-sass

Better Sass integration with Sprockets 2.x
MIT License
90 stars 29 forks source link

Less support in sprockets >= 3.x for SCSS and SASS files. #40

Closed bogdanRada closed 7 years ago

bogdanRada commented 7 years ago

Hello, i have recently added support for sprockets 3.x for Less too in this pull request https://github.com/lloeki/sprockets-less/pull/5

I recently discovered that with Sprockets 2.x it is possible to use Less inside SCSS or SASS files. ( I mean requiring Less files or importing them inside SCSS or SASS files ) This adds this support to sprockets >= 3.x

Without this changes , trying to use LESS inside SASS or SCSS will result in a error.

I tested this and now is working ok. ALthough the pull request for Sprockets-Less is not yet merged into master, this won't affect anything, because if the class is not available will simply skip the step of setting the correct processor for LESS.

I am not sure how to detect other processors for LESS but i will try to find a better way in maybe other pull request. Currently i am checking if the class exists.

Please let me know what you think

bogdanRada commented 7 years ago

Travis Failed for ruby 2.0 and 2.1.5 because of an issue with bundler on Travis itself, it somehow requires an older version of bundler. I left a comment on this https://github.com/travis-ci/travis-ci/issues/5831 for that.

Tests are passing locally for all ruby versions.

bogdanRada commented 7 years ago

@petebrowne , can you please review this pull request? This also fixes a bug in the V3::Importer where :data key is deleted from context ( Which was a bug)

Thank you very much

bogdanRada commented 7 years ago

This can be closed in favor of this https://github.com/petebrowne/sprockets-sass/pull/41 which fixes this problem and we no longer need to add workarounds for less.