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 trial

CSS Sass Basics Getting Started with Sass Declaring and Using Variables

Michael Morales
PLUS
Michael Morales
Courses Plus Student 138 Points

I can't find the directory for my sass file using terminal which means I can't get it to watch. Please help.

I installed sass on my mac. I also downloaded CodeKit but I'm a little lost.

4 Answers

Nicholas Pretorius
Nicholas Pretorius
18,684 Points

The following will help orientate you on the command line:

  • pwd : tells you which directory you are currently in ('cd' on Windows)
  • ls : lists all the files/directories of the current directory you are in ('dir' on Windows)
  • ls -l : will list all the files in 'long format' i.e. with more details than ls alone.
  • clear : will clear the current terminal

As mentioned above:

  • cd .. : will navigate up the folder path (cd.. on Windows. Note that Windows does not require a space before the ..)
  • cd folder-name : will navigate down the specified folder path (same on Windows)

Depending on your OS, the commands might differ slightly. When using Finder or Windows Explorer, you can often right-click and see if there is an "Open in Terminal" (or similar) command.

For example, if you have a terminal utility like iTerm2 installed, you will see a "New iTerm Window Here" option or a "New iTerm Tab Here" option when you right-click.

Using npm, git, webpack, gulp etc are all command line based and will help you get comfortable. You will find that npm tasks (as defined in package.json files) are essentially collections of commands line arguments bundled together.

David Kanwisher
David Kanwisher
9,751 Points

Review directory navigation from the command line. It will be an important skill in your toolbelt as a developer.

https://www.davidbaumgold.com/tutorials/command-line/

Zack Lee
PLUS
Zack Lee
Courses Plus Student 17,662 Points

Just 'cd' to your project file and and then cd into the folder you're keeping your sass and css. You can use the command 'cd ../' to move up a directory if you find yourself down the wrong path.

You shouldn't have to go to the folder where sass was installed, thats deep in some lib directory. Thats location is used by the terminal to run sass commands.

Once you're in your projects folders css path running 'sass --watch' should keep an eye on that folder for you.

Ivan Baranov
Ivan Baranov
11,344 Points

I would recommend you the gulp course here, there you will find all that you need.