<?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: sharath mohan</title>
    <description>The latest articles on DEV Community by sharath mohan (@sharathmohan007).</description>
    <link>https://dev.to/sharathmohan007</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%2F380673%2Fb39e9710-954e-4fd1-a2c6-441709cf259c.jpg</url>
      <title>DEV Community: sharath mohan</title>
      <link>https://dev.to/sharathmohan007</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sharathmohan007"/>
    <language>en</language>
    <item>
      <title>Why CSS Still Rocks in 2024</title>
      <dc:creator>sharath mohan</dc:creator>
      <pubDate>Tue, 10 Dec 2024 18:28:24 +0000</pubDate>
      <link>https://dev.to/sharathmohan007/why-css-still-rocks-in-2024-446i</link>
      <guid>https://dev.to/sharathmohan007/why-css-still-rocks-in-2024-446i</guid>
      <description>&lt;p&gt;Love it or hate it, CSS continues to prove its worth. The past year has been a rollercoaster in the world of software engineering, with AI seemingly poised to take over our jobs. Yet, despite the rise of automation, CSS remains an essential skill that evolves alongside technology.  &lt;/p&gt;

&lt;p&gt;Remember when we used to joke about AI being "too dumb to center a div"? Well, times have changed—and so has CSS. Let’s explore some exciting new features that make CSS more powerful than ever.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. &lt;strong&gt;Align Content&lt;/strong&gt;: Centering Made Easy
&lt;/h2&gt;

&lt;p&gt;Gone are the days when you &lt;em&gt;had&lt;/em&gt; to rely on Flexbox or Grid to center a div. With the &lt;code&gt;align-content&lt;/code&gt; property, CSS now offers a simpler and more direct way to handle alignment.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📖 &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/align-content" rel="noopener noreferrer"&gt;Learn more about &lt;code&gt;align-content&lt;/code&gt;&lt;/a&gt;  &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. &lt;strong&gt;@property&lt;/strong&gt;: Dynamic Custom Properties
&lt;/h2&gt;

&lt;p&gt;CSS variables introduced us to reusable variable names, but the &lt;code&gt;@property&lt;/code&gt; feature takes this a step further. It allows developers to define custom properties with explicit rules, making animations and theming more predictable and flexible.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📖 &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@property" rel="noopener noreferrer"&gt;Learn more about &lt;code&gt;@property&lt;/code&gt;&lt;/a&gt;  &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. &lt;strong&gt;@starting-style&lt;/strong&gt;: Simplifying Transitions
&lt;/h2&gt;

&lt;p&gt;Transitioning from &lt;code&gt;display: block&lt;/code&gt; to &lt;code&gt;display: none&lt;/code&gt; while maintaining animations used to be a headache. Enter &lt;code&gt;@starting-style&lt;/code&gt;—a new feature that makes it easier to define styles at the start of a transition.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📖 &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@starting-style" rel="noopener noreferrer"&gt;Learn more about &lt;code&gt;@starting-style&lt;/code&gt;&lt;/a&gt;  &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  4. &lt;strong&gt;Light-Dark Function&lt;/strong&gt;: Native Theme Switching
&lt;/h2&gt;

&lt;p&gt;Many developers use JavaScript to manage light and dark modes, but CSS now offers a built-in &lt;code&gt;light-dark&lt;/code&gt; function. This simplifies theme management, reducing reliance on external scripts.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;📖 &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark" rel="noopener noreferrer"&gt;Learn more about &lt;code&gt;light-dark&lt;/code&gt;&lt;/a&gt;  &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Honoring Rebecca Purple: A Tribute to CSS History
&lt;/h2&gt;

&lt;p&gt;One of the most exciting updates this year isn’t a feature—it’s a tribute. The CSS logo has adopted the color &lt;strong&gt;Rebecca Purple&lt;/strong&gt; (&lt;code&gt;#663399&lt;/code&gt;) to honor Rebecca Alison Meyer, daughter of CSS pioneer Eric Meyer. This thoughtful change celebrates the human stories behind the technology we use every day.  &lt;/p&gt;




&lt;p&gt;CSS continues to evolve, introducing features that make our lives easier while honoring its rich history. Whether you're a fan or a skeptic, one thing is clear: CSS still rocks!  &lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>programming</category>
      <category>news</category>
    </item>
    <item>
      <title>Setup Prettier with Vite &amp; VS Code</title>
      <dc:creator>sharath mohan</dc:creator>
      <pubDate>Tue, 01 Nov 2022 06:11:30 +0000</pubDate>
      <link>https://dev.to/sharathmohan007/setup-prettier-with-vite-vs-code-3fme</link>
      <guid>https://dev.to/sharathmohan007/setup-prettier-with-vite-vs-code-3fme</guid>
      <description>&lt;p&gt;Lets face it code formatting is real pain, specially when working on shared projects. Fortunately we have got prettier to solve this problem. This is article is a short guide for setting up prettier in Visual Studio Code, But IDE would do.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Prettier?
&lt;/h2&gt;

&lt;p&gt;Prettier is an opinionated code formatter, for many languages,like Javacript, CSS, JSX.. (mostly all client side tools) and also can be extended to other languages with community plugins&lt;/p&gt;

&lt;h2&gt;
  
  
  Time to setup
&lt;/h2&gt;

&lt;p&gt;I will scaffold a quick react typescript project using vite.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm create vite@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Install prettier
&lt;/h2&gt;

&lt;p&gt;Install prettier as a dev dependency, this helps us to configure prettier on a per page project&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;--save-dev&lt;/span&gt; &lt;span class="nt"&gt;--save-exact&lt;/span&gt; prettier
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create file name .prettierrc.json
&lt;/h2&gt;

&lt;p&gt;This will act as the configuration file for prettier. It can be configured using json, YAML or javascript I will be using json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;

    &lt;/span&gt;&lt;span class="nl"&gt;"tabWidth"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"semi"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"singleQuote"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"arrowParens"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"avoid"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This would format the code by using a tab space of 2, adding semi colons at the end of all line endings, using single quotes instead of double, and omits parathesis in arrow functions whenever possible&lt;/p&gt;

&lt;p&gt;More rules can be found &lt;a href="https://prettier.io/docs/en/options.html"&gt;Rules&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;now you can run prettier using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx prettier &lt;span class="nt"&gt;--write&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great!, but can still do better, instead of manually running the configuration we can setup our IDE/Text Editor to help us out.&lt;/p&gt;

&lt;p&gt;I am giving the guide for VS Code&lt;/p&gt;

&lt;h2&gt;
  
  
  Install the prettier extension
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode"&gt;VS code extension&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Settings
&lt;/h2&gt;

&lt;p&gt;You can quickly configure the settings by using settings.json file&lt;/p&gt;

&lt;p&gt;Press &lt;strong&gt;CMD+OPTION+P&lt;/strong&gt; or  &lt;strong&gt;CTRL+ALT+P&lt;/strong&gt; and type in &lt;strong&gt;open settings json&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;

  &lt;/span&gt;&lt;span class="nl"&gt;"editor.defaultFormatter"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"esbenp.prettier-vscode"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.formatOnPaste"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.formatOnSave"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will use the formatting option as prettier and follow the configuration set in the configuration file created earlier and also apply formatting when you save or paste a code.&lt;/p&gt;

&lt;p&gt;Bam !! &lt;/p&gt;

&lt;p&gt;But what if you need to ignore certain files from formatting say the package-lock.json or the dist/build files. That where .prettierignore comes into play&lt;/p&gt;

&lt;p&gt;Create a file called .prettierignore. This works similar to .gitignore and you can follow the same setup&lt;/p&gt;

&lt;p&gt;Hope you guys loved it. This is the first part of setting up a good DX using Vite and React. eventually reaching &lt;a href="https://github.com/sharath-mohan/react-dx-template"&gt;https://github.com/sharath-mohan/react-dx-template&lt;/a&gt; this template.&lt;/p&gt;

&lt;p&gt;If you liked this article, a star on the github repo would be awesome &lt;/p&gt;

</description>
      <category>vite</category>
      <category>vscode</category>
      <category>prettier</category>
      <category>javascript</category>
    </item>
    <item>
      <title>File Upload in React</title>
      <dc:creator>sharath mohan</dc:creator>
      <pubDate>Thu, 11 Aug 2022 15:56:43 +0000</pubDate>
      <link>https://dev.to/sharathmohan007/file-upload-in-react-1j2k</link>
      <guid>https://dev.to/sharathmohan007/file-upload-in-react-1j2k</guid>
      <description>&lt;p&gt;Working with file upload is one of those things you somehow wind up doing. Here is a small article on doing the same in React&lt;br&gt;
First of all, we need to understand on how &lt;strong&gt;refs&lt;/strong&gt; work in React. Ref's act as pointers on DOM elements, like how you would be selecting an element using say&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9tqpn4fh2ai7sd0ya3iu.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9tqpn4fh2ai7sd0ya3iu.png" alt="docuemnt is selector"&gt;&lt;/a&gt;&lt;br&gt;
and the &lt;strong&gt;useContext&lt;/strong&gt; Hook to manage those ref's&lt;/p&gt;

&lt;p&gt;In this example, I have created a ref called inputRef that is connected to the input element, each element connected to the ref can a current property on which you can use all the properties supported by that element, in this case value&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjcf5lc0w4c8mvl8qqyfb.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjcf5lc0w4c8mvl8qqyfb.png" alt="ref example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;lets add the FileType, FormData and fetch API&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy3p2u69wy72eeh2vuukx.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy3p2u69wy72eeh2vuukx.png" alt="file-upload"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Chrome Extensions to make your life with css easy</title>
      <dc:creator>sharath mohan</dc:creator>
      <pubDate>Mon, 04 Jul 2022 10:41:39 +0000</pubDate>
      <link>https://dev.to/sharathmohan007/chrome-extensions-to-make-your-life-with-css-easy-1ej</link>
      <guid>https://dev.to/sharathmohan007/chrome-extensions-to-make-your-life-with-css-easy-1ej</guid>
      <description>&lt;p&gt;Working with CSS can be a brain-drainer, and it is not a hidden fact. Here are few chrome extensions that can make life easy when working and debugging css&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Whatfont&lt;/strong&gt;&lt;br&gt;
Ever wondered what is that awesome font that you find on a site that you just visited, &lt;a href="https://chrome.google.com/webstore/detail/whatfont/jabopobgcpjmedljpbcaablpmlmfcogm"&gt;whatfont&lt;/a&gt; can help you find it in a giffy&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3DyvQ3O0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/CyGmJzJBUyaEwgAlsTqiCVRrkhKQpEaDHiXGLIbjJnQIz4txsgGuo-cNTeRDI2ljxAHjJFjM72xXTtJfvZrDx50Fnw%3Dw640-h400-e365-rj-sc0x00ffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3DyvQ3O0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/CyGmJzJBUyaEwgAlsTqiCVRrkhKQpEaDHiXGLIbjJnQIz4txsgGuo-cNTeRDI2ljxAHjJFjM72xXTtJfvZrDx50Fnw%3Dw640-h400-e365-rj-sc0x00ffffff" alt="whatfont" width="640" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Visbug&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/visbug/cdockenadnadldjbbgcallicgledbeoc"&gt;Visbug&lt;/a&gt; is what I could call the swiss amry knife of a web developer, it providers easy inspection, modification of a web page&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0lXayNiH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://portalzine.de/wp-content/uploads/sites/3/2019/02/visbug_browser_design_tool.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0lXayNiH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://portalzine.de/wp-content/uploads/sites/3/2019/02/visbug_browser_design_tool.jpg" alt="visbug" width="880" height="550"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. CSS peeper&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/css-peeper/mbnbehikldjhnfehhnaidhjhoofhpehk"&gt;CSS peeper&lt;/a&gt; helps you to look into the web pages assets and styles without ever opening up your inspector&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oeJ9dk4R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mac-cdn.softpedia.com/screenshots/CSS-Peeper_2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oeJ9dk4R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://mac-cdn.softpedia.com/screenshots/CSS-Peeper_2.jpg" alt="css peeper" width="880" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Emmet re:view&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://chrome.google.com/webstore/detail/emmet-review/epejoicbhllgiimigokgjdoijnpaphdp"&gt;Emmet Re:view&lt;/a&gt;,is the easiest way to check the responsiveness of a website&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--unHbJZ0u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/og19ii-_XXkaIYDepWFufuHFLlRIbcMyvJLuQRrXjHoO9jIE3GkiZ7DlPnEg1tPtHifJHUrXJ_Q4xBLmXRDHQ341Mkc%3Dw640-h400-e365-rj-sc0x00ffffff" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--unHbJZ0u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://lh3.googleusercontent.com/og19ii-_XXkaIYDepWFufuHFLlRIbcMyvJLuQRrXjHoO9jIE3GkiZ7DlPnEg1tPtHifJHUrXJ_Q4xBLmXRDHQ341Mkc%3Dw640-h400-e365-rj-sc0x00ffffff" alt="emmet" width="640" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy Coding!!&lt;/p&gt;

</description>
      <category>css</category>
      <category>productivity</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Make your Git Commit Messages better</title>
      <dc:creator>sharath mohan</dc:creator>
      <pubDate>Tue, 28 Jun 2022 06:21:04 +0000</pubDate>
      <link>https://dev.to/sharathmohan007/make-your-git-commit-messages-better-1mco</link>
      <guid>https://dev.to/sharathmohan007/make-your-git-commit-messages-better-1mco</guid>
      <description>&lt;p&gt;Have you wondered how the make awesome commit messages in open source projects?. Here’s how you can also make your git commit messages better&lt;br&gt;
I am huge fan of&lt;a href="https://angular.io/"&gt; Angular&lt;/a&gt; and digging through the contribution guidelines of the project I found a specific pattern, and after a brief search I came across this guideline called &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/"&gt;conventional commits&lt;/a&gt;, they say&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A specification for adding human and machine readable meaning to commit messages&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9gw9Wz08--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iheegmskpap2dlg4l26x.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9gw9Wz08--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iheegmskpap2dlg4l26x.gif" alt="whats special" width="498" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;so whats special here?&lt;/p&gt;

&lt;p&gt;The idea is to organize your commit messages, by using a standard specification, and your commit message would look somewhat 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;&amp;lt;type&amp;gt;[optional scope]: &amp;lt;description&amp;gt;

[optional body]

[optional footer(s)]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The commit contains the following structural elements, to communicate intent to the consumers of your library:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;fix: a commit of the type fix patches a bug in your codebase (this correlates with PATCH in Semantic Versioning).&lt;/li&gt;
&lt;li&gt;feat: a commit of the type feat introduces a new feature to the codebase (this correlates with MINOR in Semantic Versioning).&lt;/li&gt;
&lt;li&gt;BREAKING CHANGE: a commit that has a footer BREAKING CHANGE:, or appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.&lt;/li&gt;
&lt;li&gt;types other than fix: and feat: are allowed, for example @commitlint/config-conventional (based on the the Angular convention) recommends build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, and others.&lt;/li&gt;
&lt;li&gt;footers other than BREAKING CHANGE:  may be provided and follow a convention similar to git trailer format.&lt;/li&gt;
&lt;li&gt;Additional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE). A scope may be provided to a commit’s type, to provide additional contextual information and is contained within parenthesis, e.g., feat(parser): add ability to parse arrays.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now why should I use this? …&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatically generating CHANGELOGs.&lt;/li&gt;
&lt;li&gt;Automatically determining a semantic version bump (based on the types of commits landed).&lt;/li&gt;
&lt;li&gt;Communicating the nature of changes to teammates, the public, and other stakeholders.&lt;/li&gt;
&lt;li&gt;Triggering build and publish processes.&lt;/li&gt;
&lt;li&gt;Making it easier for people to contribute to your projects, by allowing them to explore a more structured commit history.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QZ7p0ovY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4lr4aw2ug14xj76d04bc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QZ7p0ovY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4lr4aw2ug14xj76d04bc.gif" alt="easy commits" width="220" height="163"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It sure has made my life easy  while merging code, and boarding new people to the team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Happy Coding!!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>programming</category>
      <category>productivity</category>
      <category>git</category>
    </item>
    <item>
      <title>Nginx configuration for Angular2+ Deployment</title>
      <dc:creator>sharath mohan</dc:creator>
      <pubDate>Wed, 06 May 2020 11:08:57 +0000</pubDate>
      <link>https://dev.to/sharathmohan007/nginx-configuration-for-angular2-deployment-2b94</link>
      <guid>https://dev.to/sharathmohan007/nginx-configuration-for-angular2-deployment-2b94</guid>
      <description>&lt;h2&gt;
  
  
  Quick note
&lt;/h2&gt;

&lt;p&gt;Nginx is a high performance web server with some additional capabilities such as load-balancing and reverse-proxy.&lt;br&gt;
Angular is one of the most popular framework for building single page applications.&lt;br&gt;
Angular apps can be connected to a Node js server and deployed but in most cases deployment with a simple web server would be suffice.&lt;/p&gt;

&lt;p&gt;Angular can use either of the two routing strategies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hash Routing&lt;/li&gt;
&lt;li&gt;Path Routing (default for Angular)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Path Routing utilizes the new HTML 5 push state API for routing. Therefore we need a web server capable of working with the HTML 5 push state API.Well most web servers don’t work this way out of the box. In these cases the hash routing strategy can be used, but tends to make the URL look messy. Nginx can be configured to deploy any Angular App with HTML 5 push state API.&lt;br&gt;
Build your Angular app by using the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng build --prod 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a new folder under /var/www , usually the domain name of your app, let us assume to be example.com&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo mkdir /var/www/example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;copy the contents /dist/appname to /var/www/example.com&lt;/p&gt;

&lt;p&gt;Nginx utilizes server blocks to host multiple domains on an single server, you to need to make certain changes to the configuration file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /etc/nginx/sites-enabled/default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the configuration&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server{
    listen 80;
    listen [::] 80;
    server_name www.example.com example.com;
    root /var/www/example.com;
    index index.html;
    location / {
        try_files $uri$args $uri$args/ /index.html;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The configurations are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nginx listens on port 80&lt;/li&gt;
&lt;li&gt;server name is the domain name with www and without it&lt;/li&gt;
&lt;li&gt;root points to location of the app&lt;/li&gt;
&lt;li&gt;index points to initial page to be loaded&lt;/li&gt;
&lt;li&gt;location refers path that should be pointed to on the url patterns, all routes will point to index.html, if this is not added, on refreshing the page Nginx throws a 404 error.&lt;/li&gt;
&lt;li&gt;Note: Use wildcard route pattern in angular to catch 404 errors
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const routes: Routes = [
{path:"**",component: PagenotfoundComponent}
];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart Nginx&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo service nginx restart 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Happy coding !!&lt;/p&gt;

</description>
      <category>nginx</category>
      <category>angular</category>
      <category>configuration</category>
      <category>404</category>
    </item>
  </channel>
</rss>
