Giter Site home page Giter Site logo

Comments (5)

hagenburger avatar hagenburger commented on May 29, 2024

Hey @joostliketoast, Sprockets’ require is not supported as it looses variables/mixins/… compared to Sass’ own @import.

As this question pops up often, I would be open to support it, if somebody wants to contribute :)

from livingstyleguide.

joostliketoast avatar joostliketoast commented on May 29, 2024

@hagenburger we use @import only in the partial where the variables and such are actually being referenced. This saves us a lot of compile time and makes it possible to use things like live-reload again.

A nice article about using sprockets and @import
http://blog.teamtreehouse.com/tale-front-end-sanity-beware-sass-import

from livingstyleguide.

joostliketoast avatar joostliketoast commented on May 29, 2024

@hagenburger also we would also be willing to contribute :)

from livingstyleguide.

hagenburger avatar hagenburger commented on May 29, 2024

👍

I’m not using Sprockets in my main projects right now*. So I’m very happy to assist as I think it would be great to have this implemented!

* The compile time of < 2 s for a lot of Sass via a Gulp task running in parallel to Rails was good enough comparing to much more than 30 s via Sprockets. The downside: Within LSG files you can’t use the Rails helpers anymore, which is more easy to implement when embedded in Sprockets.

from livingstyleguide.

joostliketoast avatar joostliketoast commented on May 29, 2024

@hagenburger I made it so @scss yourfile.css.scss now searches for the asset in sprockets.
But would you like a option parameter for this like @scss yourfile.css.scss type: sprockets
or that it always loads the file using the sprockets enviroment if Sprockets is available?

from livingstyleguide.

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.