<?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>Forem: Rohan Villoth</title>
    <description>The latest articles on Forem by Rohan Villoth (@rohanvilloth).</description>
    <link>https://forem.com/rohanvilloth</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%2F609632%2F826e3d03-4b89-441c-b08b-ef05746880b7.jpg</url>
      <title>Forem: Rohan Villoth</title>
      <link>https://forem.com/rohanvilloth</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rohanvilloth"/>
    <language>en</language>
    <item>
      <title>How to replicate a PDF template into multiple pages</title>
      <dc:creator>Rohan Villoth</dc:creator>
      <pubDate>Mon, 09 Aug 2021 20:27:51 +0000</pubDate>
      <link>https://forem.com/rohanvilloth/how-to-replicate-a-pdf-template-into-multiple-pages-ljo</link>
      <guid>https://forem.com/rohanvilloth/how-to-replicate-a-pdf-template-into-multiple-pages-ljo</guid>
      <description>&lt;p&gt;I've been using &lt;a href="https://poppler.freedesktop.org" rel="noopener noreferrer"&gt;poppler&lt;/a&gt; for command line operations on PDFs, like split, merge, conversions, etc., as part of my workflow. My usual use-case is merging PDFs generated from SVGs, like described here in my article on &lt;a href="https://medium.com/@HEXcube/use-inkscape-to-create-multipage-pdf-documents-from-svgs-a1a11e6dce3d" rel="noopener noreferrer"&gt;creating multipage PDF documents from SVGs&lt;/a&gt;. Using commands for stuff like this can improve efficiency and productivity, whereas most GUI based methods would've made this process more time consuming and repetitive. So, when I found my significant other manually duplicating inner pages for her &lt;a href="https://kdp.amazon.com" rel="noopener noreferrer"&gt;Amazon KDP&lt;/a&gt; notebook template, I set out to find a command to automate it.&lt;/p&gt;

&lt;p&gt;Surprisingly, I couldn't find a built-in method on any CLI tool to do this directly. So, I used my Google-Fu and got this two liner working:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;1..120&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do &lt;/span&gt;&lt;span class="nb"&gt;cp &lt;/span&gt;template.pdf template-&lt;span class="nv"&gt;$i&lt;/span&gt;.pdf&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done
&lt;/span&gt;pdfunite template-&lt;span class="k"&gt;*&lt;/span&gt;.pdf merged.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first command creates 120 copies of the template. Adjust the number as per your need. The second one then merges all these copies as pages into one PDF file. Make sure you have &lt;code&gt;poppler-utils&lt;/code&gt; installed for &lt;code&gt;pdfunite&lt;/code&gt; command to work. Windows users need to use a bash compatible shell like PowerShell or a Linux distro through WSL. &lt;/p&gt;

&lt;h2&gt;
  
  
  Credits &amp;amp; Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Cover image from &lt;a href="https://unsplash.com/photos/1yj3lRDWD6k" rel="noopener noreferrer"&gt;directory pages&lt;/a&gt; by &lt;a href="https://unsplash.com/@igordresjan?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Igor Dresjan A.P.&lt;/a&gt; on &lt;a href="https://unsplash.com/?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cyberciti.biz/faq/bsd-appleosx-linux-bash-shell-run-command-n-times/" rel="noopener noreferrer"&gt;Linux / UNIX: Run Command a Number of Times In a Row&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://librarycarpentry.org/lc-shell/04-loops/index.html" rel="noopener noreferrer"&gt;Automating the tedious with loops&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://superuser.com/questions/600877/how-do-i-duplicate-pages-within-pdf-files-automatically/865818#865818" rel="noopener noreferrer"&gt;How do I duplicate pages within PDF files automatically? - Solution with for loop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://superuser.com/questions/600877/how-do-i-duplicate-pages-within-pdf-files-automatically/993634#993634" rel="noopener noreferrer"&gt;How do I duplicate pages within PDF files automatically? - Solution with pdfunite&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>pdf</category>
      <category>command</category>
      <category>poppler</category>
      <category>amazonkdp</category>
    </item>
    <item>
      <title>Build an Android app with Ionic, without Android Studio</title>
      <dc:creator>Rohan Villoth</dc:creator>
      <pubDate>Fri, 18 Jun 2021 22:22:53 +0000</pubDate>
      <link>https://forem.com/rohanvilloth/build-an-android-app-with-ionic-without-android-studio-487i</link>
      <guid>https://forem.com/rohanvilloth/build-an-android-app-with-ionic-without-android-studio-487i</guid>
      <description>&lt;p&gt;Ionic 5's official documentation recommends &lt;a href="https://ionicframework.com/docs/angular/your-first-app/6-deploying-mobile#android-deployment" rel="noopener noreferrer"&gt;using Android Studio to build&lt;/a&gt; the project. However, I can think of a few reasons to sidestep Android Studio in the build process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Android Studio is relatively resource-intensive&lt;/li&gt;
&lt;li&gt;A command-line method could be simpler and faster than opening up a full-blown Android development environment&lt;/li&gt;
&lt;li&gt;Using Android Studio just for the build process might break your workflow, if you've gotten comfortable with your existing development chain, say VScode and the CLI tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whatever your reasons are, Android apks could be built from your Ionic 5 project with a few extra commands. Before building, you can test if your app runs fine in the browser with this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ionic serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don't have an Ionic 5 project ready, create a blank project with this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ionic start sample-ionic-angular-app blank &lt;span class="nt"&gt;--type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;angular &lt;span class="nt"&gt;--capacitor&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Refer to &lt;a href="https://ionicframework.com/docs/angular/your-first-app" rel="noopener noreferrer"&gt;Ionic 5's first app docs&lt;/a&gt; for more details on how to get started with Ionic app development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Build the Ionic project&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ionic build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: Add support for the Android platform&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ionic capacitor add android
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;: Sync changes from your Ionic project to the Android part&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ionic capacitor &lt;span class="nb"&gt;sync&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt;: Build for Android and generate apk&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;android &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; ./gradlew assembleDebug &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; ..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the build completes successfully, you'll find your app's apk at &lt;code&gt;android/app/build/outputs/apk/debug/app-debug.apk&lt;/code&gt;. From now on, whenever you need to build for Android, you need to repeat only steps 3 and 4.&lt;/p&gt;

&lt;h2&gt;
  
  
  Credits &amp;amp; Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://forum.ionicframework.com/t/how-to-build-an-android-apk-file-without-using-android-studio-in-a-capacitor-project/177814/9" rel="noopener noreferrer"&gt;How to build an Android APK file without using Android Studio in a Capacitor project?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Cover image created from logos of &lt;a href="https://source.android.com/setup/start/brands" rel="noopener noreferrer"&gt;Android&lt;/a&gt; and &lt;a href="https://commons.wikimedia.org/wiki/File:Ionic_Logo.svg" rel="noopener noreferrer"&gt;Ionic&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ionic</category>
      <category>android</category>
      <category>webdev</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Why bootstrap utilities makes your Ionic development easier</title>
      <dc:creator>Rohan Villoth</dc:creator>
      <pubDate>Thu, 17 Jun 2021 21:34:28 +0000</pubDate>
      <link>https://forem.com/rohanvilloth/why-bootstrap-utilities-makes-your-ionic-development-easier-3kfb</link>
      <guid>https://forem.com/rohanvilloth/why-bootstrap-utilities-makes-your-ionic-development-easier-3kfb</guid>
      <description>&lt;p&gt;&lt;a href="https://ionicframework.com" rel="noopener noreferrer"&gt;Ionic&lt;/a&gt; makes it easy for web developers to build mobile and web apps with the same codebase. And it's latest iteration, Ionic 5, provides a &lt;a href="https://ionicframework.com/docs/layout/grid" rel="noopener noreferrer"&gt;responsive grid&lt;/a&gt; and some basic &lt;a href="https://ionicframework.com/docs/layout/css-utilities" rel="noopener noreferrer"&gt;CSS utilities&lt;/a&gt;. However, coming from a background of web development with Bootstrap 4, I missed responsive utility classes based on breakpoints. Things like &lt;code&gt;ml-md-5&lt;/code&gt; for a left margin of 5 units on medium screen sizes and up and &lt;code&gt;px-xl-3&lt;/code&gt; for a horizontal padding of 3 units on extra large screen sizes and above. See the &lt;a href="https://getbootstrap.com/docs/4.1/utilities/spacing/" rel="noopener noreferrer"&gt;spacing utilities docs of Bootstrap 4&lt;/a&gt; for a better idea. In contrast, Ionic only had basic &lt;code&gt;ion-padding-&amp;lt;direction&amp;gt;&lt;/code&gt; classes with no option for choosing padding size or breakpoints.&lt;/p&gt;

&lt;p&gt;So, I searched for a way to get these utility classes on my Ionic 5 project and found &lt;a href="https://github.com/MohannadNaj/bootstrap-utilities-dist" rel="noopener noreferrer"&gt;Bootstrap Utilities&lt;/a&gt;, a package providing only the utilities portion of Bootstrap 4.1, without the rest of Bootstrap. As a result, this is a lightweight library, having no conflict with Ionic 5's CSS classes. Can't say the same for other specialized and heavyweight utility libraries like Tailwind (for which, you may refer to &lt;a href="https://blog.andrewbrey.com/2020-07-06-using-tailwindcss-with-ionic-5-and-angular-10/" rel="noopener noreferrer"&gt;"Using TailwindCSS with Ionic 5 and Angular 10"&lt;/a&gt;). Another advantage is, the grid breakpoints of both frameworks are compatible as well. See &lt;a href="https://getbootstrap.com/docs/4.1/layout/overview/#responsive-breakpoints" rel="noopener noreferrer"&gt;Bootstrap 4's breakpoints&lt;/a&gt; and &lt;a href="https://ionicframework.com/docs/layout/css-utilities#ionic-breakpoints" rel="noopener noreferrer"&gt;Ionic 5's breakpoints&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How To Use
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;bootstrap-utilities&lt;/code&gt; node package can be added to your project, with the usual steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;bootstrap-utilities &lt;span class="nt"&gt;--save&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or for yarn:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn add bootstrap-utilities
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add then add the following line to &lt;code&gt;global.scss&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;"~bootstrap-utilities"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, all the utility CSS classes from Bootstrap 4.1 are available for use in your Ionic 5 project. To see a detailed list of classes available, refer the &lt;a href="https://getbootstrap.com/docs/4.1/utilities/" rel="noopener noreferrer"&gt;utilities section of Bootstrap 4.1 documentation&lt;/a&gt;. These classes could make UI development in Ionic 5 easier and faster for developers having experience in Bootstrap, as well as those who want more advanced utilities than what Ionic offers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Credits &amp;amp; Sources
&lt;/h2&gt;

&lt;p&gt;Cover image created from logos of &lt;a href="https://worldvectorlogo.com/downloaded/bootstrap-4" rel="noopener noreferrer"&gt;Bootstrap&lt;/a&gt; and &lt;a href="https://commons.wikimedia.org/wiki/File:Ionic_Logo.svg" rel="noopener noreferrer"&gt;Ionic&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ionic</category>
      <category>webdev</category>
      <category>mobile</category>
      <category>npm</category>
    </item>
    <item>
      <title>How to add Sass support to a Vite React app</title>
      <dc:creator>Rohan Villoth</dc:creator>
      <pubDate>Wed, 16 Jun 2021 20:25:49 +0000</pubDate>
      <link>https://forem.com/rohanvilloth/how-to-add-sass-support-to-a-vite-react-app-37p</link>
      <guid>https://forem.com/rohanvilloth/how-to-add-sass-support-to-a-vite-react-app-37p</guid>
      <description>&lt;p&gt;After styling React components through CSS-in-JS (JSS) for a while, I came across &lt;a href="https://sitepoint.com/react-components-styling-options/" rel="noopener noreferrer"&gt;"Style React Components: 7 Ways Compared"&lt;/a&gt; and decided to switch to my favorite preprocessor, Sass. So, I followed &lt;a href="https://scotch.io/starters/react/adding-sass-to-create-react-app-applications#toc-install-node-sass" rel="noopener noreferrer"&gt;"Adding Sass to Create React App Applications"&lt;/a&gt; and ran this:&lt;/p&gt;

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

&lt;/div&gt;

&lt;p&gt;That was supposed to work. However, on importing &lt;code&gt;Login.scss&lt;/code&gt; file into &lt;code&gt;Login.jsx&lt;/code&gt; with &lt;code&gt;import './Login.scss'&lt;/code&gt;, I encountered this error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[vite] Internal server error: Preprocessor dependency "sass" not found. Did you install it?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Turns out this project was using something called &lt;a href="https://vitejs.dev" rel="noopener noreferrer"&gt;Vite&lt;/a&gt; and so I have to find a way to make Sass work with Vite. I googled and found Vite mentioning &lt;a href="https://vitejs.dev/guide/features.html#css-pre-processors" rel="noopener noreferrer"&gt;CSS Pre-processors support on their docs&lt;/a&gt; and this article titled &lt;a href="https://sitepoint.com/vitejs-front-end-build-tool-introduction/" rel="noopener noreferrer"&gt;"What is Vitejs? An Overview of the New Front-end Build Tool"&lt;/a&gt; suggesting &lt;code&gt;npm install sass --save-dev&lt;/code&gt;. I referred &lt;a href="https://classic.yarnpkg.com/en/docs/cli/install/" rel="noopener noreferrer"&gt;yarn-install docs&lt;/a&gt; and converted it for yarn:&lt;/p&gt;

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

&lt;/div&gt;

&lt;p&gt;Now my Sass styles started working! So, I guess Vite needed a different approach than the usual React method. To make sure &lt;code&gt;node-sass&lt;/code&gt; isn't used at all, I removed it:&lt;/p&gt;

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

&lt;/div&gt;

&lt;p&gt;and everything seems to work so far. In case I find anything breaking later, will update here. Happy sass'ing! 😁&lt;/p&gt;

&lt;h2&gt;
  
  
  Credits &amp;amp; Sources
&lt;/h2&gt;

&lt;p&gt;Cover image made from logos of &lt;a href="https://commons.wikimedia.org/wiki/File:Sass_Logo_Color.svg" rel="noopener noreferrer"&gt;Sass&lt;/a&gt;, &lt;a href="https://vitejs.dev" rel="noopener noreferrer"&gt;Vite&lt;/a&gt; and &lt;a href="https://commons.wikimedia.org/wiki/File:React-icon.svg" rel="noopener noreferrer"&gt;React&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>css</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How to initialize a cloned yarn project</title>
      <dc:creator>Rohan Villoth</dc:creator>
      <pubDate>Tue, 15 Jun 2021 21:59:56 +0000</pubDate>
      <link>https://forem.com/rohanvilloth/how-to-initialize-a-cloned-yarn-project-3183</link>
      <guid>https://forem.com/rohanvilloth/how-to-initialize-a-cloned-yarn-project-3183</guid>
      <description>&lt;p&gt;Being used to npm based projects for years, I encountered a yarn based one yesterday. I've read about yarn before, but never got the chance to work on it until now. So, I searched around to find the basics to get it working. I found it to be pretty similar to npm so far, with a few changes here and there. If you've cloned a project repo already setup with yarn, these are the general instructions to follow:&lt;/p&gt;

&lt;h2&gt;
  
  
  For Yarn 1.x
&lt;/h2&gt;

&lt;p&gt;Make sure yarn is installed globally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, move to project folder and upgrade to latest in yarn 1.x branch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/path/to/project
yarn &lt;span class="nb"&gt;set &lt;/span&gt;version latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install the project dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the finally, &lt;strong&gt;build and/or run the project&lt;/strong&gt;. Similar to npm based projects, you can check &lt;code&gt;package.json&lt;/code&gt; file in the project folder and find the necessary commands listed there. Should be like &lt;code&gt;yarn build&lt;/code&gt;, &lt;code&gt;yarn dev&lt;/code&gt;, &lt;code&gt;yarn start&lt;/code&gt;, &lt;code&gt;yarn serve&lt;/code&gt;, etc.&lt;/p&gt;

&lt;p&gt;Another interesting thing to keep in mind is, the yarn equivalents of &lt;code&gt;npm install --save&lt;/code&gt; and &lt;code&gt;npm install --save-dev&lt;/code&gt; are &lt;code&gt;yarn add&lt;/code&gt; and &lt;code&gt;yarn add --dev&lt;/code&gt;, respectively. I found it mentioned on the &lt;a href="https://classic.yarnpkg.com/en/docs/cli/install/" rel="noopener noreferrer"&gt;documentation page of yarn install command&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  For Yarn 2.x
&lt;/h2&gt;

&lt;p&gt;Yarn 2.x is meant to be installed per project. So, follow the same steps as yarn 1.x described above, but just before &lt;code&gt;yarn set version latest&lt;/code&gt;, run this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn &lt;span class="nb"&gt;set &lt;/span&gt;version berry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check if yarn is on version 2.x with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, follow the same steps for 1.x. For more info, refer to &lt;a href="https://yarnpkg.com/getting-started/install#per-project-install" rel="noopener noreferrer"&gt;Yarn 2 docs&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Downgrade from Yarn 2.x to 1.x
&lt;/h2&gt;

&lt;p&gt;If you're like me and accidentally installed yarn 2.x on a 1.x based project 😅, don't worry! It's nothing a few commands can't fix. Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn &lt;span class="nb"&gt;set &lt;/span&gt;version classic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then follow the steps described above for yarn 1.x. The &lt;a href="https://yarnpkg.com/cli/set/version" rel="noopener noreferrer"&gt;documentation page for yarn set version command&lt;/a&gt; describes more ways to set specific versions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Credits &amp;amp; Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://yarnpkg.com/getting-started" rel="noopener noreferrer"&gt;Yarn Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Cover image from &lt;a href="https://getlogovector.com/yarn-package-manager-logo-vector-svg/" rel="noopener noreferrer"&gt;Get Logo Vector&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>node</category>
      <category>npm</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why I'm blogging on DEV now</title>
      <dc:creator>Rohan Villoth</dc:creator>
      <pubDate>Tue, 01 Jun 2021 09:56:24 +0000</pubDate>
      <link>https://forem.com/rohanvilloth/why-i-m-blogging-on-dev-now-kj8</link>
      <guid>https://forem.com/rohanvilloth/why-i-m-blogging-on-dev-now-kj8</guid>
      <description>&lt;p&gt;After my previous blogging attempts on GitHub Pages and Medium, I'm giving DEV a try. I've been noting down ideas and content for blogs, but never found time to complete those drafts and publish them. So, this time I'm trying a different approach. I'll be using DEV kinda like a developer journal, to write about interesting technical stuff I find daily. This will be a quick blogging platform for me, where I can note down and share my ideas and experiences. That was the original plan for &lt;a href="https://HEXcube.github.io/blog" rel="noopener noreferrer"&gt;my (now discontinued) blog on GitHub Pages&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As for &lt;a href="https://medium.com/@HEXcube" rel="noopener noreferrer"&gt;my Medium blog&lt;/a&gt;, I'll be continuing it parallelly. However, I'll reserve it for more polished content, not necessarily technical or development related. So, I'll be writing here on DEV more frequently, and on Medium only when I have enough time to curate the content. That'll keep the flow of writing blogs, I hope.&lt;/p&gt;




&lt;h2&gt;
  
  
  Credits &amp;amp; Sources
&lt;/h2&gt;

&lt;p&gt;Cover image from &lt;a href="https://unsplash.com/photos/vZJdYl5JVXY" rel="noopener noreferrer"&gt;person using laptop&lt;/a&gt; by &lt;a href="https://unsplash.com/@kaitlynbaker?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Kaitlyn Baker&lt;/a&gt; on &lt;a href="https://unsplash.com/?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>firstpost</category>
      <category>devjournal</category>
      <category>developerdiary</category>
      <category>devlog</category>
    </item>
  </channel>
</rss>
