3

I jumped into SASS tonight and I'm using Sublime Text 2 with SASS Build and SublimeOnSaveBuild. After much searching, I still cannot find how to specify a different output directory. I basically have a CSS/ directory and a SCSS/ directory which contains all of my SASS files. I want to output to ../CSS. I think it involves modifying the Package Setting file in Sublime. Here is the default preferences file:

{ "filename_filter": "\.(css|js|sass|less|scss)$", "build_on_save": 1 }

I believe the "build" or "output" path goes there but I'm just not sure. Thanks in advance.

3 Answers 3

7

The answer is to change the settings for SASS Build, rather than SublimeOnSaveBuild. SASS Build creates a "Build System" for SASS and SASS Minified. You can go to Preferences -> Browse Packages, open the SASS Build folder, and then edit the two files ending with -build.

"cmd": ["sass", "--update", "$file:${file_path}/${file_base_name}.css", "--stop-on-error", "--no-cache"],

You can edit the file path there (there isn't a way to do per project yet it seems):

"cmd": ["sass", "--update", "$file:${file_path}/../css/${file_base_name}.css", "--stop-on-error", "--no-cache"],

Now, how to get them to stop building partials...that's the separate issue that I'm currently trying to find the best way to resolve. EDIT: Stopped it from building partials. Posted a blog about it here.

Sign up to request clarification or add additional context in comments.

Comments

0

Perhaps this does not directly answer your question, but I'd like to try.

In my SASS installation (with Compass, however), I have config.rb in my project. In there you can actually specify where the compiled CSS file go.

...
css_dir = "css"
...

If you are not using Compass, my humble suggestion is to have a look at it. It is sort of an extension to SASS (much like jQuery to javascript)

2 Comments

Thank you for your response. I came across that file while I was searching around but I realized it was exclusively for Compass. If I can't resolve the Sublime packages in a few days then I will probably just purchase Compass. Currently I copy my SCSS files to my CSS directory and it builds in place but I would prefer to have some control over where it outputs. Thanks.
I don't think you need to purchase Compass, it is open-source. The good thing about Compass: as a package it allows you to control where it is outputted, much like what you needed. And compass -watch build automatically too.
-1

Install 'compass'. Create your next project in the terminal using compass (this is all documented) and the config.rb file will have the appropriate folders/directories and your sass/compass compiler will do everything automatically. You can either use compass watch in the terminal or a programme like LiveReload to do the work for you. In fact, use LiveReload. Honestly, you won't regret it!!!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.