Pregunta

I have several dozen sub directories in my stylesheets folder, many of which refer to each other with variables defined in the file _settings.sass. In my application.sass file, I importing settings first:

@import "settings"
@import "folder-one/some-sass-file"
@import "folder-two/some-other-sass-file"

This works well in development, but when I try to precompile, I get an error about $namespace being undefined in "folder-one/some-sass-file"--even though it's defined right there at the top in _settings.sass.

This seems to be happening because the compiler is trying to compile everything in sequential order, rather than looking at application.sass. Am I understanding this right? And if so, what can I do to remedy the problem?

¿Fue útil?

Solución

You just need to add @import "settings" into your some-sass-file. Asset pipeline will minify it for you so there is no problem.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top