<?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: TheD</title>
    <description>The latest articles on DEV Community by TheD (@thedka).</description>
    <link>https://dev.to/thedka</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%2F40009%2F2ef32b4d-17c4-42f9-9e01-1606814ae926.jpeg</url>
      <title>DEV Community: TheD</title>
      <link>https://dev.to/thedka</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thedka"/>
    <language>en</language>
    <item>
      <title>How to detect changes in all scss files with gulp</title>
      <dc:creator>TheD</dc:creator>
      <pubDate>Sun, 25 Mar 2018 21:41:04 +0000</pubDate>
      <link>https://dev.to/thedka/how-to-detect-changes-in-all-scss-files-with-gulp-36n9</link>
      <guid>https://dev.to/thedka/how-to-detect-changes-in-all-scss-files-with-gulp-36n9</guid>
      <description>&lt;p&gt;This is a tip for easily detect changes in all ‘.scss’ files with gulp. Some people are confused about it, but, it’s a logical question, pretty easy, and i will show how to do it step by step.&lt;/p&gt;

&lt;h1&gt;
  
  
  First off all
&lt;/h1&gt;

&lt;p&gt;Write some gulp tasks:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h1&gt;
  
  
  Where the magic happens
&lt;/h1&gt;

&lt;p&gt;You must to have one main &lt;strong&gt;.scss&lt;/strong&gt; file and how many partial files you want. Partial files are .scss files named with an underscore prefix, with &lt;strong&gt;smaller css parts&lt;/strong&gt; that will be ignorated and will not generate a new css file but will be imported in the &lt;strong&gt;main&lt;/strong&gt; .scss file.&lt;/p&gt;

&lt;p&gt;So, &lt;strong&gt;don’t put the underscore prefix in the partial files until you end your job&lt;/strong&gt;. Yep, that’s right. &lt;strong&gt;Gulp will not ignore the files without the underscore prefix&lt;/strong&gt;, cause for now they are treated as normal style files, and then &lt;strong&gt;Gulp will watch every file&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Of course, when you end your job, you will have to delete every generated css file from the partial files, put the underscore prefix in each partial file name and in their references. Depending of your project size, you don’t have to spend more than ten or fifteen minutes to do it. But, if you want, you can automate it, ’cause everything can be automated in JavaScript.&lt;/p&gt;

&lt;p&gt;Hope this helps.&lt;br&gt;
See you next time!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>gulp</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
