<?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: Ibrahim</title>
    <description>The latest articles on DEV Community by Ibrahim (@inalbant).</description>
    <link>https://dev.to/inalbant</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%2F174731%2F807450a3-9908-45b5-95ba-f3b8246e7199.jpg</url>
      <title>DEV Community: Ibrahim</title>
      <link>https://dev.to/inalbant</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/inalbant"/>
    <language>en</language>
    <item>
      <title>What's your teams' strategy for updating dependencies?</title>
      <dc:creator>Ibrahim</dc:creator>
      <pubDate>Tue, 07 Jul 2020 12:18:29 +0000</pubDate>
      <link>https://dev.to/inalbant/what-s-your-teams-strategy-for-updating-dependencies-2jh8</link>
      <guid>https://dev.to/inalbant/what-s-your-teams-strategy-for-updating-dependencies-2jh8</guid>
      <description>&lt;p&gt;I'm known to be quite OCD about using the latest software available. &lt;br&gt;
And, recently transitioning into web development, I find my OCD fires up a lot with all the tons of npm packages that our apps depend on. &lt;/p&gt;

&lt;p&gt;In the teams I've worked at, I haven't seen any solid strategy for updating packages, I find that the vast majority of devs are super afraid of updating dependencies, and they all look at me like I'm crazy if/when I suggest to do something about it.&lt;br&gt;
The result is that we end up with a (functioning) app, that is basically stuck with dependencies on the versions that they were installed with possible vulnerabilities and bugs, outdated ways of doing things. &lt;/p&gt;

&lt;p&gt;Am I just super weird, or is there some sort of strategy you all follow with your team's?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>A simpler way to add TailwindCSS to your Svelte project</title>
      <dc:creator>Ibrahim</dc:creator>
      <pubDate>Fri, 08 May 2020 11:44:34 +0000</pubDate>
      <link>https://dev.to/inalbant/a-simpler-way-to-add-tailwindcss-to-your-svelte-project-11ja</link>
      <guid>https://dev.to/inalbant/a-simpler-way-to-add-tailwindcss-to-your-svelte-project-11ja</guid>
      <description>&lt;p&gt;So currently, from what I found, there are only about 3 or 4 articles that show you how to add TailwindCSS to a Svelte app. And I'm pretty sure they all work great, but they're kinda outdated now and include unnecessary things.&lt;br&gt;&lt;br&gt;
On 29th April 2020, Tailwind was updated to v1.4 and added built-in PurgeCSS support. This is great and means that we no longer have to install PurgeCSS ourselves nor set up a config for it. &lt;/p&gt;

&lt;p&gt;Okay so, let's get started with the guide! &lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1: Install dependencies
&lt;/h3&gt;

&lt;p&gt;These 3 dependencies are the only ones we're going to need:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm i --save-dev tailwindcss postcss-cli npm-run-all&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Create and configure Tailwind config file
&lt;/h3&gt;

&lt;p&gt;Run the command:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx tailwind init&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Open the newly created &lt;code&gt;tailwind.config.js&lt;/code&gt; and add &lt;code&gt;"./src/**/*.svelte"&lt;/code&gt; inside the &lt;code&gt;purge&lt;/code&gt; options array. &lt;br&gt;
This will ensure that all the thousands of unused CSS rules that Tailwind creates will be purged at build.&lt;br&gt;
Your config should now look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
  purge: ["./src/**/*.svelte"],
  theme: {
    extend: {},
  },
  variants: {},
  plugins: [],
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Configure PostCSS
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;postcss.config.js&lt;/code&gt; in the root folder and add these lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const tailwindcss = require("tailwindcss");

module.exports = {
  plugins: [tailwindcss("./tailwind.config.js")],
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Add Tailwind to your CSS
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;tailwind.css&lt;/code&gt; under your &lt;code&gt;public&lt;/code&gt; folder, and add these lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@tailwind base;
@tailwind components;
@tailwind utilities;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 5: Link to CSS in your HTML
&lt;/h3&gt;

&lt;p&gt;Open &lt;code&gt;index.html&lt;/code&gt; and link the &lt;code&gt;index.css&lt;/code&gt; that will contain the CSS rules that Tailwind will produce for your app. Yes, it doesn't exist yet, but it'll be created by our scripts.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;link rel="stylesheet" href="index.css" /&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;You can also delete &lt;code&gt;global.css&lt;/code&gt; and the link to it in &lt;code&gt;index.html&lt;/code&gt; as Tailwind already comes with CSS normalize and resets.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Add scripts
&lt;/h3&gt;

&lt;p&gt;In the &lt;code&gt;package.json&lt;/code&gt; file, ensure your scripts look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
    "watch:tailwind": "postcss public/tailwind.css -o public/index.css -w",
    "build:tailwind": "NODE_ENV=production postcss public/tailwind.css -o public/index.css",
    "dev": "run-p start:dev autobuild watch:tailwind",
    "build": "npm run build:tailwind &amp;amp;&amp;amp; rollup -c",
    "start": "sirv public --single",
    "start:dev": "sirv public --single --dev",
    "autobuild": "rollup -c -w"
  },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it! You can start your app with the usual &lt;code&gt;npm run dev&lt;/code&gt; command.&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>svelte</category>
      <category>postcss</category>
      <category>purgecss</category>
    </item>
  </channel>
</rss>
