<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Russ Perry</title>
    <description>The latest articles on DEV Community by Russ Perry (@russdevs).</description>
    <link>https://dev.to/russdevs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F485529%2F1beca967-8f4c-41fd-a3ad-0d4555b7ca06.jpeg</url>
      <title>DEV Community: Russ Perry</title>
      <link>https://dev.to/russdevs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/russdevs"/>
    <language>en</language>
    <item>
      <title>Set Up Your Next Web Dev Project with SCSS Made Easy!</title>
      <dc:creator>Russ Perry</dc:creator>
      <pubDate>Wed, 30 Jun 2021 23:21:59 +0000</pubDate>
      <link>https://dev.to/russdevs/set-up-your-next-web-dev-project-with-scss-made-easy-230d</link>
      <guid>https://dev.to/russdevs/set-up-your-next-web-dev-project-with-scss-made-easy-230d</guid>
      <description>&lt;p&gt;If you are anything like me, sometimes vanilla CSS just doesn't cut it. I mostly use SCSS for it's organizational purposes. &lt;/p&gt;

&lt;p&gt;Here, I will walk you through the pretty simple steps of how to set up SCSS for your next project! This article will just help you on how to set up SCSS / SASS in your project. If you would like to learn more on how to use SCSS / SASS and what it can do, you can check out the official SASS Guide &lt;a href="https://sass-lang.com/guide" rel="noopener noreferrer"&gt;Here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you don't care about the in depth explanations, check out the TLDR; section at the bottom!&lt;/p&gt;

&lt;p&gt;I have a folder structure that seems to work pretty well for me. In any given project folder, I will have a &lt;code&gt;dist&lt;/code&gt; folder that holds my index.html, image files, and any JavaScript files I may have. This is considered my distribution file, and if someone wanted to deploy the website, they could just use that folder to deploy without all that extra SCSS stuff to get in the way.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating your project folders
&lt;/h3&gt;

&lt;p&gt;Let's start off by creating a project folder for yourself. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a folder for your project.&lt;/li&gt;
&lt;li&gt;Within that folder, create another folder labeled &lt;code&gt;dist&lt;/code&gt;. You can name it whatever you want, but this is the name I use.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Also within your project folder, create another one called &lt;code&gt;scss&lt;/code&gt;. This will house all of your SCSS files.&lt;br&gt;
It should look a little something like this: &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fltwj0q98024oyhdpaonc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fltwj0q98024oyhdpaonc.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next step is installing node.js...&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Installing Node and SASS
&lt;/h3&gt;

&lt;p&gt;Before we get started with SCSS, you will need Node on your machine. To get node, you can go to &lt;a href="https://nodejs.org/en/download/" rel="noopener noreferrer"&gt;Node's Website Here&lt;/a&gt; and follow the instructions for your device. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Once node is installed, open your terminal.&lt;/li&gt;
&lt;li&gt;To validate that you have node installed, run the command &lt;code&gt;node --version&lt;/code&gt;. You should see a version number returned.&lt;/li&gt;
&lt;li&gt;Now we will globally install SASS. To do this, run the command &lt;code&gt;npm install -g sass&lt;/code&gt;. This will install it globally on your machine.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Code all your SCSS to your heart's content
&lt;/h3&gt;

&lt;p&gt;Here is where you can get creative and code your SCSS files! Have fun with it!&lt;/p&gt;

&lt;h3&gt;
  
  
  Compiling your SCSS
&lt;/h3&gt;

&lt;p&gt;Alright, now let's see what you did!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Within your terminal, you can navigate to your file path. 

&lt;ul&gt;
&lt;li&gt;To do this, you can type in &lt;code&gt;cd &amp;lt;filepath&amp;gt;&lt;/code&gt;. So if your project was on your desktop, you can do &lt;code&gt;cd \desktop\my_project&lt;/code&gt; and you will be brought to your project.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Enter the command &lt;code&gt;sass /scss/main.scss dist/css/main.css&lt;/code&gt;. This will build and compile your SCSS files. Just run that command every time you want to compile!&lt;/li&gt;
&lt;li&gt;Just refresh your project, and BOOM! It's updated!&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  How I Use SCSS
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foiv0u2yanf7io1b3nu4d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foiv0u2yanf7io1b3nu4d.png" alt="image"&gt;&lt;/a&gt;&lt;br&gt;
I use SCSS for organization. You can see how I am using this in one of my real projects I am working on. Within the SCSS folder, I use the &lt;code&gt;main.scss&lt;/code&gt; file as a file that holds imports to all other scss files. I then break down each section of the website into it's own scss file. So you can see in the above screenshot, I have a file specifically for the Hero of the page.&lt;/p&gt;

&lt;h3&gt;
  
  
  TLDR;
&lt;/h3&gt;

&lt;p&gt;I know I was wordy up there, you can find a simple numbered list here on how to set it up.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create your project folder&lt;/li&gt;
&lt;li&gt;Within project folder, create a &lt;code&gt;dist&lt;/code&gt; folder&lt;/li&gt;
&lt;li&gt;Within the project folder, create an &lt;code&gt;scss&lt;/code&gt; folder&lt;/li&gt;
&lt;li&gt;Install &lt;a href="https://nodejs.org/en/download" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; if you have not already.&lt;/li&gt;
&lt;li&gt;In your terminal, run the command &lt;code&gt;npm install -g sass&lt;/code&gt; to install SASS globally.&lt;/li&gt;
&lt;li&gt;Navigate to your project within your terminal.&lt;/li&gt;
&lt;li&gt;Code your SCSS with all your might!&lt;/li&gt;
&lt;li&gt;When you are ready to compile your SCSS files, you can enter the command &lt;code&gt;sass /scss/main.scss dist/css/main.css&lt;/code&gt;. This will build and compile your SCSS files. Just run that command every time you want to compile!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Congratulations, you are now up and running with SASS! Happy Coding!&lt;/p&gt;

</description>
      <category>scss</category>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
