<?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: Ajith kannan</title>
    <description>The latest articles on DEV Community by Ajith kannan (@rakchamp).</description>
    <link>https://dev.to/rakchamp</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%2F168515%2F27b6b46d-17c9-458c-a86d-1495ea5c35f0.jpg</url>
      <title>DEV Community: Ajith kannan</title>
      <link>https://dev.to/rakchamp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rakchamp"/>
    <language>en</language>
    <item>
      <title>Is Ember App Upgrade Easy?</title>
      <dc:creator>Ajith kannan</dc:creator>
      <pubDate>Wed, 17 Jul 2019 12:22:38 +0000</pubDate>
      <link>https://dev.to/rakchamp/is-ember-app-upgrade-easy-38b3</link>
      <guid>https://dev.to/rakchamp/is-ember-app-upgrade-easy-38b3</guid>
      <description>&lt;p&gt;Off-course yes, it was easy to achieve with few commands.&lt;/p&gt;

&lt;h1&gt;
  
  
  What to expect
&lt;/h1&gt;

&lt;p&gt;Upgrading ember app it depends on whether the app having patch, minor and major version update.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Patch Change -&amp;gt; 3.4.1 to 3.4.3&lt;/li&gt;
&lt;li&gt;Minor Change -&amp;gt; 3.4 to 3.5&lt;/li&gt;
&lt;li&gt;Major Change -&amp;gt; 3.0 to 4.0&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Patch Change
&lt;/h3&gt;

&lt;p&gt;Mostly in patch version update, internal refactors and bug fixes are introduced and also changes in dependency version in ember.&lt;/p&gt;

&lt;h3&gt;
  
  
  Minor Change
&lt;/h3&gt;

&lt;p&gt;In minor version update, new feature are introduced and &lt;strong&gt;developers should notice the deprecations&lt;/strong&gt;. In minor change, ember core team will not completely remove the deprecation changes. It will log in console as deprecation warnings, may be future(major change), it will be completely removed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Major Change
&lt;/h3&gt;

&lt;p&gt;In major change update, breaking changes are introduced, So developers should ensure the deprecations before upgrade the app.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to do an upgrade
&lt;/h2&gt;

&lt;p&gt;As i said, it was easy and do the following&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Step 1: Install npm package &lt;a href="https://www.npmjs.com/package/ember-cli-update" rel="noopener noreferrer"&gt;ember-cli-update&lt;/a&gt; globally.&lt;/li&gt;
&lt;li&gt;Step 2: Run the following command, it performs ember init jobs for &lt;strong&gt;latest version&lt;/strong&gt; with current app.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ember-cli-update --resolve-conflicts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Step 3: Mostly in major version, code changes are very difficult. But no need to worry about it. Ember solves it in single command. Run the following command,
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ember-cli-update --run-codemods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above command will list the codemods like the following image &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F7g075jvpdx9hjeizvfkm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F7g075jvpdx9hjeizvfkm.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  So What is codemods?
&lt;/h4&gt;

&lt;p&gt;Codemod is a tool/library to assist you with large-scale codebase refactors that can be partially automated but still require human oversight and occasional intervention.&lt;/p&gt;

&lt;p&gt;By running codemod, it overrides allover inside the ember app. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pretty Cool?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want to update specific version, run the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ember-cli-update --to 3.4.3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Trouble shooting
&lt;/h2&gt;

&lt;p&gt;If you want to revert the change, run the following command, it will get you back before the update.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --hard
git clean -f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Options for ember-cli-update command:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fm8rotm0u7lxf93aeexdy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fm8rotm0u7lxf93aeexdy.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ready to kick start ember version upgrade?&lt;/p&gt;

&lt;p&gt;Hope you figure out the concept well. Thanks for reading.  &lt;/p&gt;

</description>
      <category>ember</category>
      <category>upgradeember</category>
      <category>versionupgrade</category>
      <category>update</category>
    </item>
    <item>
      <title>Themes </title>
      <dc:creator>Ajith kannan</dc:creator>
      <pubDate>Tue, 21 May 2019 04:54:08 +0000</pubDate>
      <link>https://dev.to/rakchamp/themes-1o90</link>
      <guid>https://dev.to/rakchamp/themes-1o90</guid>
      <description>&lt;p&gt;Hello folks, Let's see the journey of mine with the Themes. Whenever we create a new theme, we have to deal with CSS. So again we are going to write the same CSS with different colors and it makes the code repetitive like the following Script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Light Theme&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;product .light-theme {
   background-color: white;
   color: blue;
}
product .light-theme:hover {
   background-color: blue;
   color: white;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dark Theme&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;product .dark-theme {
   background-color: black;
   color: white;
}
product .dark-theme:hover {
   background-color: white;
   color: black;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;For the optimization, Custom Properties play a major role in this CSS. Interesting..?&lt;br&gt;&lt;br&gt;
&lt;strong&gt;So what is Custom Properties ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Custom Property is a pre-defined variable and it stores the value of the CSS property.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Okay, Then how it gonna be optimized?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whenever we update the variable (Custom Property) &lt;em&gt;&lt;code&gt;within the scope&lt;/code&gt;&lt;/em&gt;, it automatically update the values of property which used the same variable (Custom Property).&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/ajay25kools/embed/BeRMRm?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pretty Cool ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lets see the code,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:root{
  --libg : white;
  --licolor : black;
  --borderleft : blue;
  --libghover : #e1e1e8;
  --lihovercolor : blue;
}
.sidebar {
  width: 220px;
  .light {
    li {
      background-color : var(--libg);
      color : var(--licolor);
      border-left : 5px solid var(--borderleft);
      &amp;amp;:hover {
        background-color : var(--libghover);
        color : var(--lihovercolor);
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Dark theme made by Custom Variable&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.sidebar {
  .dark {
  --libg : #151f2a;
  --licolor : white;
  --borderleft : blue;
  --libghover : black;
  --lihovercolor : white;
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Redundant CSS reduced.&lt;/li&gt;
&lt;li&gt;Easy to customize.&lt;/li&gt;
&lt;li&gt;No need to track the CSS properties.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hope you figure out the concept well. Let's see you on another journey. Thanks for reading.&lt;/p&gt;

</description>
      <category>darktheme</category>
      <category>customproperty</category>
      <category>theme</category>
    </item>
  </channel>
</rss>
