Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sass file globbing? #11

Closed
thedavidmeister opened this issue Mar 15, 2016 · 4 comments
Closed

sass file globbing? #11

thedavidmeister opened this issue Mar 15, 2016 · 4 comments

Comments

@thedavidmeister
Copy link

I'd love to be able to use this, it looks like it would be great to be able to watch and sass with boot instead of having a ruby setup running in parallel in the project just for stylesheets.

The only thing holding me back is not being able to glob :(

https://github.com/chriseppstein/sass-globbing

Maybe I misunderstand, but there's already a custom @import setup in this project, so it wouldn't be crazy hard to add globbing?

@Deraen
Copy link
Owner

Deraen commented Mar 15, 2016

Hmm, interesting. Looks like this should be doable as the Jsass Importer interface allows to return multiple results from single import. Though I am not sure if that does what I think it does.

I don't have time to implement this myself now, but I can offer some pointers if you are interested in implementing this.

  • What files should globs match?
    • Local files (Boot fileset / Lein source-dirs)?
    • Classpath resources?
    • Webjars?
    • I am thinking that local files are enough
  • Would be good to use some existing glob library to handle most of stuff?

@Deraen
Copy link
Owner

Deraen commented Mar 15, 2016

Looks like Java NIO includes file globbing implementation.

https://docs.oracle.com/javase/tutorial/essential/io/find.html
http://javapapers.com/java/glob-with-java-nio/

@Deraen
Copy link
Owner

Deraen commented Oct 7, 2016

This has been debated a lot in Libsass and Sass issues:

sass/sass#1517
sass/libsass#156

I agree with the reasons there:

No. Sass, like CSS, is an order-sensitive language, and glob-based imports make the ordering of imports unclear and fragile. This is a recipe for accidentally introducing subtle bugs that are hard to track down or even notice. - sass/sass#1517 (comment)

@Deraen Deraen closed this as completed Oct 7, 2016
@thedavidmeister
Copy link
Author

It's OK, I moved to Garden anyway and implemented a ns scanner sort of like clojure.test @Deraen thanks for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants