Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialryan champin
16,836 PointsSASS output file location
So i have a style.css in my main directory of a wordpress site. I have a scss folder which contains my sass. How do i have it output the cs file to my main directory?
Im using terminal btw
3 Answers
Chris Shaw
26,676 PointsHi Ryan,
You can achieve this very simply, in your terminal window ensure you're within the parent folder that your scss
folder lives within, next you can use the below command being mindful to change app.scss
to the name of your actual base SCSS file that you're importing your code into.
sass --watch scss/app.scss:style.css
One other thing to note is the colon between .scss
and style
, anything on the left side of the colon is the source path and anything on the right side is the compiled path.
Hope that helps.
efewafewa
21,825 Pointsdoes putting your scss file in your main directory and --watch'ing' it work?
efewafewa
21,825 PointsWhy do you want the output in your main directory instead of the css folder? An easy fix for this if you want to do it that way would be to move your scss file into your main directory itself, or change your file path to reach into the folder your scss file is in.
ryan champin
16,836 Pointsbecause wordpress requires the style.css file to be in the main directory