brackets-sass
brackets-sass copied to clipboard
outputDir option does not work in combination with ruby
Just noticed that when "sass.compiler" is "ruby", the output folder is always "/css", no matter what "outputDir" defines. Only of the compiler is set to "libsass", outputDir works as designed.
Can't reproduce.
How is your .brackets.json file?
Thanks for your quick reply.
Here's the .brackets.json I've tested:
{ "language.fileExtensions": { "dwt": "html" }, "sass.compiler": "ruby", "sass.compass": true, "sass.options": { "sourceComments": false, "outputStyle": "nested", "outputDir": "" } }
It does not matter how the "outputDir" option is set, the actual output folder for all .scss files is always "/css", i.e. folder named "css" under the project root. This also happens if you omit the "outputDir" completely.
If I change the compiler to "libsass", "outputDir" works as documented.
BTW: I'm using ruby under Windows, if that helps.
@derwaldgeist I can only reproduce the issue using compass (It doesn't depend on the compiler which is used)
@derwaldgeist Until this isn't fixed you can add a config.rb file at the root of your project:
css_dir = "output/dir/relative/to/your/project/roort"
Thanks, I did not know about this Ruby option! I'll test it.
@nicolo-ribaudo: I first also thought it was related to compass. But then, strangely, it also happened when I disabled compass. Maybe it is enough that compass was enabled once?
config.rb works just using Compass. More info at http://compass-style.org/help/documentation/configuration-reference/
I first also thought it was related to compass. But then, strangely, it also happened when I disabled compass. Maybe it is enough that compass was enabled once?
That is strange :confused: Options aren't cached, so the result shouldn't be affected by what you did before.
Hi Nicolo, I now tried the config.rb workaround. It works in principle, but does not give me the desired result. The folder css_dir points always seems to be relative to the project's root folder. Yet, I would like to store the generated css files right where the source files are located, at an arbitrary level of my project structure. The reason behind this is that I am using polymer, and I would like to keep the web components together with their sass and css. Even if I state css_dir="." or css_dir="./", it is always the root folder where the generated css is stored - not the folder where the source file was located. In the compass config documentation, I could not find any option to define a real "sass-file-relative" path. Even if I use css_path instead, this is always using the project root as it's own root. Strangely, css_path="" or css_path="./" would store the css files in a folder "/css" (instead of "/styles"), and css_dir="" stores the files right in the project root folder. It would be easy if I knew about a variable that stores the source file path, but the compass doc does not mention any, and I'm not a Ruby expert.