Giter Club home page Giter Club logo

Comments (5)

metaskills avatar metaskills commented on August 29, 2024

I tried writing our import preprocessor (https://github.com/metaskills/less-rails/blob/master/lib/less/rails/import_processor.rb) in such a way that it only acts on less files. My goal was it would noop in all other situations. The preprocessor is critical for us as it is the only way for us to hook in dependencies on other less assets. Is there a way it should be written to be more friendly? Maybe @chriseppstein can help too?

from less-rails.

metaskills avatar metaskills commented on August 29, 2024

I just published less-rails v2.1.4 that touches the import preprocessor. Does that help this issue too?

from less-rails.

chriseppstein avatar chriseppstein commented on August 29, 2024

Maybe I missed it, but I didn't see any change that would cause the import processor to be selectively ran on less files.

The way that sass handles this is by making the imports resolved during template evaluation.

from less-rails.

metaskills avatar metaskills commented on August 29, 2024

I can not go that route since less's template evaluation is in the JavaScript. We have monkey patched that far down for our rails asset helpers, but found that doing so for import is much more difficult. Hence the preprocessor was our best choice.

Is this a good enough guard?
https://github.com/metaskills/less-rails/blob/master/lib/less/rails/import_processor.rb#L18

from less-rails.

dalecaru avatar dalecaru commented on August 29, 2024

@metaskills It works now with 2.1.4. You can close the issue.
Thanks.

from less-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.