<?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: Rabbi lii</title>
    <description>The latest articles on DEV Community by Rabbi lii (@rabbi_lii_).</description>
    <link>https://dev.to/rabbi_lii_</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%2F2010965%2F182c4fb1-5ea9-46ea-bd1c-3ac241c8a877.png</url>
      <title>DEV Community: Rabbi lii</title>
      <link>https://dev.to/rabbi_lii_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rabbi_lii_"/>
    <language>en</language>
    <item>
      <title>⚔️NPM vs YARN battle of ages⚔️</title>
      <dc:creator>Rabbi lii</dc:creator>
      <pubDate>Sat, 07 Sep 2024 15:15:15 +0000</pubDate>
      <link>https://dev.to/rabbi_lii_/npm-vs-yarn-battle-of-ages-5171</link>
      <guid>https://dev.to/rabbi_lii_/npm-vs-yarn-battle-of-ages-5171</guid>
      <description>&lt;p&gt;Performance&lt;br&gt;
NPM: While NPM has improved significantly over the years, especially with the introduction of NPM 7 and 8, it was traditionally slower than Yarn due to the way it handled network requests and caching.&lt;br&gt;
Yarn: Yarn was initially faster because of its parallel downloading of packages and more efficient caching mechanisms. Yarn introduced features like offline caching and deterministic installs, which sped up installations.&lt;/p&gt;

&lt;p&gt;Security &lt;br&gt;
NPM: NPM has a security feature called &lt;code&gt;npm audit&lt;/code&gt; that scans dependencies for vulnerabilities and provides fixes or workarounds.&lt;br&gt;
Yarn: Yarn also includes similar security checks with &lt;code&gt;yarn audit&lt;/code&gt;, and it is generally considered secure. Yarn’s lock file &lt;code&gt;yarn.lock&lt;/code&gt;&lt;br&gt;
is slightly more strict, which can make your builds more predictable.&lt;/p&gt;

&lt;p&gt;Offline Mode &lt;br&gt;
NPM: npm has no offline mode, &lt;br&gt;
Yarn: Offline mode for seamless installs.&lt;/p&gt;

&lt;p&gt;Yarn Disadvantages &lt;br&gt;
Takes more space in hard disk&lt;br&gt;
Problem with installing "native module"&lt;br&gt;
Yarn doesn't work with Node.js versions older than 5, as it was developed by Facebook.&lt;/p&gt;

&lt;p&gt;Initialize a project with npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run test for current packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;install dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install [package name]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yard add [package name]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Uninstall packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm uninstall [package name]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn remove [package name]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Update manager:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fky66jkn9ml4xdhgbyux0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fky66jkn9ml4xdhgbyux0.png" alt="No Description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>npm</category>
      <category>yarn</category>
      <category>webdev</category>
    </item>
    <item>
      <title>VS Code HTML shortcuts that might save your valuable time ⏳🔥</title>
      <dc:creator>Rabbi lii</dc:creator>
      <pubDate>Sat, 07 Sep 2024 14:35:15 +0000</pubDate>
      <link>https://dev.to/rabbi_lii_/vs-code-html-shortcuts-that-might-save-your-valuable-time-4h4d</link>
      <guid>https://dev.to/rabbi_lii_/vs-code-html-shortcuts-that-might-save-your-valuable-time-4h4d</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjw5fzlvyeate8yr8lw6y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjw5fzlvyeate8yr8lw6y.png" alt="No description" width="800" height="1023"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>vscode</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
