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

Pleas support environment variables - to be precise SASS_PATH #8

Open
MikeMitterer opened this issue Oct 19, 2016 · 3 comments
Open

Comments

@MikeMitterer
Copy link

Since sass 3.2/3.4 sass supports relative search path via SASS_PATH. This is a cool, underrated, feature.

With SASS_PATH it's possible to use scss-files from other packages!
More on SASS_PATH: http://technology.customink.com/blog/2014/10/09/understanding-and-using-sass-load-paths/

cmdline:

export SASS_PATH="/Volumes/Daten/DevLocal/DevDart/MaterialDesignLite/lib/:/Volumes/Daten/DevLocal/DevDart/MobiAd.REST.UI.MDL/lib"

styles.scss:

// This imports "_variables.scss" from 
// /Volumes/Daten/DevLocal/DevDart/MaterialDesignLite/lib/assets/styles/button/_variables.scss
@import "assets/styles/button/variables";
@MikeMitterer
Copy link
Author

I just published a lib that could help to resolve packagnames:
https://pub.dartlang.org/packages/packages

I also implemented this functionality in "sitegen" (https://pub.dartlang.org/packages/sitegen)
Here I read the .sitegen/site.yaml https://github.com/MikeMitterer/dart-sitegen/blob/master/lib/src/Config.dart#L270-L316

This is how the site.yaml could look like: https://pub.dartlang.org/packages/sitegen

The place where I pass over the SASS_PATH to sass: https://github.com/MikeMitterer/dart-sitegen/blob/master/lib/src/Application.dart#L389-L404

Hope this helps!

@zoechi
Copy link
Collaborator

zoechi commented Oct 21, 2016

Thanks for the pointer.

Why did you create your own package when there are already https://pub.dartlang.org/packages/package_resolver and https://pub.dartlang.org/packages/package_config that seem to do the same thing.

@MikeMitterer
Copy link
Author

Hmmm, I think because it was easier to write my own resolver that does exactly what I needed than dealing with the other two...

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

No branches or pull requests

2 participants