sass / sassc

libsass command line driver
Other
785 stars 131 forks source link

SASS_PATH is ignored #253

Closed grisumbras closed 5 years ago

grisumbras commented 5 years ago

Ruby version of Sass documents environment variable SASS_PATH to used to add load paths. sassc doesn't seem to. This feature is very usefull when Sass files come from different sources and can be located in different directories and paths to those directories may vary depending on situation. In particular, if the files are pulled by a package manager.

nschonni commented 5 years ago

Did you try the -I parameter https://github.com/sass/sassc/issues/209#issuecomment-298469284

grisumbras commented 5 years ago

The parameter does work. In some cases the environment variable is more convenient, though.

grisumbras commented 5 years ago

I should probably elaborate on my use case.

I am planning to use sassc in a build process. The package that is being built will declare several dependencies, including those that contain Sass files. The package managing system I am using (Conan) allows packages to provide information on how to use them to consumers. One of the good ways to do this is environment variables. For example, packages that provide pkg-config package descriptions modify consumers' PKG_CONFIG_PATH. Packages that provide CMake modules use CMAKE_PREFIX_PATH. And so on.

If a package with Sass files adds its installation directory to consumers' SASS_PATH and then sassc uses that variable, then no further configuration for sassc is required.