<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Cl3tus on Medium]]></title>
        <description><![CDATA[Stories by Cl3tus on Medium]]></description>
        <link>https://medium.com/@cl3tus?source=rss-ae70d63420ad------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1hBfiBAZN_TsZNf5y0MKKw.jpeg</url>
            <title>Stories by Cl3tus on Medium</title>
            <link>https://medium.com/@cl3tus?source=rss-ae70d63420ad------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 11:08:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cl3tus/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Organize your Sass files]]></title>
            <link>https://cl3tus.medium.com/organize-your-sass-files-b2c2513f3fcf?source=rss-ae70d63420ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2c2513f3fcf</guid>
            <category><![CDATA[scss]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[sass]]></category>
            <dc:creator><![CDATA[Cl3tus]]></dc:creator>
            <pubDate>Mon, 24 Oct 2016 17:01:02 GMT</pubDate>
            <atom:updated>2016-10-24T17:01:02.389Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Or at least, how I organize my files.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*miUATuy4zIZlyu5ubWRgIw.png" /><figcaption>Background photo by Sai Kiran Anagani — <a href="https://unsplash.com/@iamkiran">https://unsplash.com/@iamkiran</a></figcaption></figure><p>Organization it’s a big step in each projects, especially if you reopen it 6 month later.</p><p>If you don’t know Sass, go to the <a href="http://sass-lang.com/guide">guide</a>.</p><blockquote><em>There are two syntaxes available for Sass. The first, known as SCSS (Sassy CSS) and used throughout this reference, is an extension of the syntax of CSS. This means that every valid CSS stylesheet is a valid SCSS file with the same meaning. In addition, SCSS understands most CSS hacks and vendor-specific syntax, such as IE’s old filter syntax. This syntax is enhanced with the Sass features described below. Files using this syntax have the .scss extension.</em> (<a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html">source</a>)</blockquote><h3>Create multiple files</h3><p>For a better organization, we will split our code in several folders/files. Usually, I create a css folder into a asset folder. The assets folder contains a css, icons, images and js folders.</p><p>Let’s create our first, and the main, file: app.scss</p><p>This file will contains the imports of all components and other .scss files. Let it blank for now.</p><p>Done? Ok, let’s create our future folders:</p><ul><li>Helpers</li><li>Components</li><li>Layouts</li><li>Pages</li></ul><h4>Helpers</h4><p>helpers folder will contains our <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#functions">functions</a>, <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#mixins">mixing</a> and <a href="http://sass-lang.com/documentation/file.SASS_REFERENCE.html#variables_">variables</a>.</p><p>Exemple</p><pre>── helpers<br>    ├── _functions.scss<br>    ├── _mixins.button.scss<br>    └── _parameters.scss</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d95e22efe59693de80a6b31eecc404ef/href">https://medium.com/media/d95e22efe59693de80a6b31eecc404ef/href</a></iframe><h4>Components</h4><p>The components folder will contains all the modules we will use in our code.</p><p>Exemple</p><pre>── components<br>    ├── _buttons.scss<br>    ├── _cards.scss<br>    ├── _comments.scss<br>    ├── _footer.scss<br>    ├── _header.scss<br>    ├── _navigation.scss<br>    └── _pagination.scss</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1d867b83bc650ce0367672e831ec0a13/href">https://medium.com/media/1d867b83bc650ce0367672e831ec0a13/href</a></iframe><h4>Pages</h4><p>The pages folder will contains all the css about a specific page.</p><p>Example</p><pre>── pages<br>   ├── _about.scss<br>   ├── _blog.scss<br>   ├── _post.scss<br>   ├── _projects.scss<br>   ├── _reading.scss<br>   ├── _tag.scss<br>   └── _works.scss</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0fadb64733a3f9967edc4a677a5c89b8/href">https://medium.com/media/0fadb64733a3f9967edc4a677a5c89b8/href</a></iframe><h4>Layouts</h4><p>The layouts folder contains the diffents kind of layout and responsive rules.</p><p>Example</p><pre>── layout<br>   └── _responsive.scss</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1dd8597858a818b28540a994aeaf78ac/href">https://medium.com/media/1dd8597858a818b28540a994aeaf78ac/href</a></iframe><h4>One file to rule them all</h4><p>Now we can create our app.scss file in the root folder. This file contain all the import from the sub files.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/24d56776fa949121b47addccca75fdc1/href">https://medium.com/media/24d56776fa949121b47addccca75fdc1/href</a></iframe><h3>Compile our .scss files</h3><p>We need a tool to compile our Scss code to a understandable CSS language.</p><p>We can use <strong>Gulp</strong>, <strong>Grunt</strong> or just a <strong>NPM scripts</strong>.</p><h4>Gulp</h4><p>First, you need to install some dependencies:</p><p>gulp and gulp-sass.</p><pre>$ npm install gulp gulp-sass --save-dev</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fd1134764283d93f0d3c385a57047117/href">https://medium.com/media/fd1134764283d93f0d3c385a57047117/href</a></iframe><h4>Grunt</h4><p>For this one, we’ll use grunt-sass.</p><pre>$ npm install grunt grunt-sass --save-dev</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/95c097ffe677b0cd9573c1d7f5b0efe5/href">https://medium.com/media/95c097ffe677b0cd9573c1d7f5b0efe5/href</a></iframe><h4>NPM Script</h4><p>The both Gulp and Grunt sass task use the node-sassmodule, and we can use it directly in our package.json.</p><pre>$ npm install node-sass --save-dev</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dff7f95b5a436f8e152f2eaf939d10f2/href">https://medium.com/media/dff7f95b5a436f8e152f2eaf939d10f2/href</a></iframe><h3>Useful links</h3><p>To contunie to learning more about Sass, I recommend you couple of links:</p><ul><li><a href="http://sass-lang.com/">Sass lang</a></li><li><a href="http://thesassway.com/">TheSassWay</a></li><li><a href="https://css-tricks.com/sass-style-guide/">CSS Tricks</a></li></ul><p><em>Thanks for reading this. If you know better ways to organize your code or easier methods, just let me know in the comment or in </em><a href="https://twitter.com/osternaud_clem"><em>twitter</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2c2513f3fcf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You don’t need Gulp/Grunt/Webpack]]></title>
            <link>https://cl3tus.medium.com/you-dont-need-gulp-grunt-webpack-56cc9a0934f?source=rss-ae70d63420ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/56cc9a0934f</guid>
            <category><![CDATA[gulp]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[npm]]></category>
            <dc:creator><![CDATA[Cl3tus]]></dc:creator>
            <pubDate>Wed, 12 Oct 2016 17:01:03 GMT</pubDate>
            <atom:updated>2016-10-21T03:10:09.886Z</atom:updated>
            <content:encoded><![CDATA[<p>We just need npm scripts.</p><p>Since 2 years now, I use Gulp to manage my front tasks.</p><p>Here are my main tasks:</p><ul><li>convert scss into css,</li><li>convert my ES2015 javascript files into a readable javascript</li><li>minify my javascript files</li><li>optimize my images</li><li>create a sprite from svg</li></ul><h3>Start with Scss task</h3><p>For this, we need to install <a href="https://github.com/sass/node-sass">node-sass</a>:</p><pre>npm install node-sass --save-dev</pre><p>and add this script into you package.json:</p><pre>“build:css”: “node-sass assets/css/ public/dist/css/ -r”,</pre><p>This is <a href="https://github.com/sass/node-sass#command-line-interface">a link</a> to the command line options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*ynSJTbyURcvRTtx9SAaHtQ.png" /></figure><h3>ES2015 to understandable javascript</h3><p>We want also import other npm module. So we will use <a href="https://github.com/substack/node-browserify">browserify</a>. We need <a href="https://github.com/babel/babelify">babelify</a> and his <a href="https://www.npmjs.com/package/babel-preset-es2015">babel-preset-es2015</a> plugin to compile our ES2015 code.</p><pre>npm install browserify babelify babel-preset-es2015 --save-dev</pre><p>and add this script into you package.json:</p><pre>“build:js”: “browserify assets/js/app.js -o dist/js/app.js -v -t [babelify --presets[es2015]]”,</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dKqY3JS5pZzY2MWjW9kcUw.png" /></figure><h3>Minify your js files</h3><p>For this task, we need to install the <a href="https://github.com/mishoo/UglifyJS2">uglifyjs</a> module.</p><pre>npm install uglify-js --save-dev</pre><p>and add this script into you package.json:</p><pre>“minify-js”: “uglifyjs public/dist/js/app.js -o public/dist/js/app.min.js”,</pre><p>Check the list of available options <a href="https://github.com/mishoo/UglifyJS2#usage">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*zFrUA4crLxUJ5Smn-oCMPw.png" /></figure><h3>Optimize your images</h3><p>Now, for this one, we need to install the <a href="https://github.com/imagemin/imagemin-cli">imagemin-cli</a>.</p><pre>npm install imagemin-cli --save-dev</pre><p>To use it, add this script:</p><pre>“optimize”: “imagemin assets/images/* <br>--out-dir=public/dist/images/”,</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*m5wVNFHOM_mGbF7rbl9pQA.png" /></figure><h3>Create a sprite from SVG sources</h3><p>For this task, we can use <a href="https://github.com/jkphl/svg-sprite">svg-sprite</a>.</p><pre>&quot;svg:sprite&quot;: &quot;svg-sprite --css --css-render-css --css-example --dest=out assets/svg/*.svg&quot;</pre><ul><li>— css: create a single svg sprite</li><li>— css-render-css: create a CSS file with a class per svg</li><li>— css-example: create a HTML file to preview your svg list</li><li>— dest: destination folder</li><li>and the last argument is the path to your svgs</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*ei2FHadpyKT4ba-PZuHndQ.png" /><figcaption>My ‘out’ destination folder</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tu0euLitwUekM9wUUjhn9w.png" /><figcaption>The html preview page</figcaption></figure><p>Here is a link to all the available options: <a href="https://github.com/jkphl/svg-sprite/blob/master/docs/command-line.md">https://github.com/jkphl/svg-sprite/blob/master/docs/command-line.md</a></p><h3>Watch tasks</h3><p>Generally, we need to save our scss and javascript files after changes.</p><p>The two modules we use for compile js and css accept a ‘ — watch’ parameters.</p><pre>“watch:css”: “node-sass assets/css/ -o dist/css/ -wr”,</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*IQ_eaeMKnhqrSRaFxlsiHg.png" /></figure><pre>“watch:js”: “watchify assets/js/app.js -o dist/js/app.js -v -t [ babelify --presets[es2015]]]”,</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*E5PVywCFhyremuZmFIxYNw.png" /></figure><h3>Finals touch / Optimization</h3><p>For now, we have 6 different tasks that make the jobs.</p><p>But we can (and must?) optimize some points.</p><h4>Using variables</h4><p>First of all, we have to much repeatable code (mostly the paths).</p><p>We can create some variables into our package.json</p><pre>“config”: {<br> “src”: “assets”,<br> “dist”: “public/dist”<br> },</pre><p>And we can use those variables like this:</p><pre>“build-css”: “node-sass $npm_package_config_src/css/ $npm_package_config_dist/ -r”,</pre><p>So now, when we change the location of the ‘assets’ or the ‘dist’ folder, we just need to change those variables.</p><h4>Organize our scripts</h4><p>Our scripts are not easy to read.</p><p>The best way to fix this is to create a new folder ‘bin’ and add a file per script (with the script into).</p><h4>One task to rule them all</h4><p>You can concat multiple scripts into one. I create two new tasks to build my scss and js files, and an other to watch my scss and js files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*dS0thsq9Nusx7t6luNVgHQ.png" /></figure><p><em>Thanks for reading this. If you know better ways to optimize this code or easier methods to creates task scripts, just let me know in the comment or in </em><a href="http://twitter.com/osternaud_clem"><em>twitter</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56cc9a0934f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[70 Flat Social Font Icons]]></title>
            <link>https://cl3tus.medium.com/70-flat-social-font-icons-7a8d50085d43?source=rss-ae70d63420ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a8d50085d43</guid>
            <category><![CDATA[bower]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[icons]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Cl3tus]]></dc:creator>
            <pubDate>Thu, 06 Oct 2016 03:00:56 GMT</pubDate>
            <atom:updated>2016-10-06T03:13:45.674Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*dfC-28GNmtoHqfIBKyAWwQ.gif" /><figcaption>Alexis Doreau — <a href="https://dribbble.com/shots/2720859-70-Flat-Social-Icons-for-Sketch-Updated">https://dribbble.com/shots/2720859-70-Flat-Social-Icons-for-Sketch-Updated</a></figcaption></figure><p><a href="https://medium.com/u/539d194d78e9">Alexis Doreau</a> release a new version of the <a href="https://dribbble.com/shots/2720859-70-Flat-Social-Icons-for-Sketch-Updated">70 Flat Social Icons for Sketch</a>. From this file, I generate font icons files with <a href="https://icomoon.io/">Icomoon</a>.</p><p>You can view the <a href="https://github.com/osternaudClem/70-flat-social-icons-font">github project</a> here.</p><h3>Install it</h3><h4>Zip file</h4><p>You can download the zip file <a href="https://github.com/osternaudClem/70-flat-social-icons-font/archive/master.zip">here</a>.</p><h4>NPM</h4><pre>$ npm install flat-social-icons --save</pre><h4>Bower</h4><pre>$ bower install flat-social-icons --save</pre><h3>Use it</h3><pre>&lt;head&gt;<br>  &lt;link rel=&quot;stylesheet&quot; href=&quot;..path../flat-icons.css&quot;&gt;<br>&lt;/head&gt;</pre><pre>&lt;a href=&quot;#&quot;&gt;&lt;i class=&quot;fl-icon-twitter&quot;/&gt;&lt;/a&gt;</pre><p>You can also go to <a href="http://osternaudclem.github.io/70-flat-social-icons-font/">the project page</a> to search and easy copy/fast the icons you want.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*O7bhr2CKLPLH7OAS0ol87g.gif" /><figcaption>Icons filter</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a8d50085d43" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>