<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gautham Krishna on Medium]]></title>
        <description><![CDATA[Stories by Gautham Krishna on Medium]]></description>
        <link>https://medium.com/@gauthamkrishnax?source=rss-d43207fff8cf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*T6xgxnYe2I48mgH12ieD9w.png</url>
            <title>Stories by Gautham Krishna on Medium</title>
            <link>https://medium.com/@gauthamkrishnax?source=rss-d43207fff8cf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 22:26:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gauthamkrishnax/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Where would I start today to create a small website?]]></title>
            <link>https://medium.com/@gauthamkrishnax/where-would-i-start-today-to-create-a-small-website-00a9f3226d26?source=rss-d43207fff8cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/00a9f3226d26</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[web3]]></category>
            <dc:creator><![CDATA[Gautham Krishna]]></dc:creator>
            <pubDate>Tue, 20 Aug 2024 12:24:39 GMT</pubDate>
            <atom:updated>2024-08-20T12:24:39.167Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LTXK-Xfqh4gmfAo-Qkl5tg.png" /></figure><h4>From choosing the best technical stacks and tools to setting up the development environment.</h4><p>Web development experience today is very complicated. We have all these technologies and tools to create anything we want in web. But what about a small website with very little content. Where would I start? Which framework would I use? How would I start coding?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F4JVTF9zR9BicshFAb7%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExODc5cGg5dTM5dTBmOThxeTJvYm85eHA3ZXAwMDRpMTI4aGl0cTdtdyZlcD12MV9naWZzX3NlYXJjaCZjdD1n%2F4JVTF9zR9BicshFAb7%2Fgiphy.gif&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExbHZkOGM1bXdwOHljMzY0YXduYng1cXU4YWljdDdodnFmajdyMGlmdCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F4JVTF9zR9BicshFAb7%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="313" frameborder="0" scrolling="no"><a href="https://medium.com/media/2bb32fe576705ad8663e34647365acad/href">https://medium.com/media/2bb32fe576705ad8663e34647365acad/href</a></iframe><h3>Choosing the right technology</h3><p>We’ll need <strong>HTML</strong>, <strong>CSS</strong> and <strong>JavaScript</strong> that&#39;s for certain. Why should I use anything else? What value does bringing <strong>React</strong> or any other library, framework and tools add to my developer experience or my website.</p><p>It all depends on the kind of website we are going to make and what kind of experience we need to provide its users. Here I am thinking only about the smallest of website. <strong>No backend</strong>. <strong>Minimum Content. Occasional Interactivity</strong>. I don’t think we need any more than the bare minimum for such a website.</p><p>Yes, I am talking about <strong>HTML</strong>, vanilla <strong>CSS</strong> and vanilla <strong>JavaScript. </strong>No React, No Svelte, No Tailwind or Anything that bloats our code up. We are going to use only dev-dependencies and baseline features to create our website so that it ships clean performant code to its users and there is no room for overengineering.</p><blockquote>Check out — <a href="https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Introduction#overengineering">MDN Docs on client-side framework</a></blockquote><p>What about other libraries and tools? I need a <strong>bundler</strong>, one that is fast and does the work easily. We need a linter to tell us if we do something wrong and a formatter because it&#39;s cool to see the code you write transform itself to be more legible. I choose <strong>Vite</strong> because its fast and has good support as my bundler. <strong>Eslint</strong> and <strong>Stylelint </strong>to lint<strong> JavaScript and CSS </strong>along with <strong>prettier</strong> to format. Nothing new, All mainstream players in the ecosystem.</p><h3>Getting Started</h3><p>Before we start, Disclaimer — This is not a tutorial but just a demo. Better use the latest versions and follow the documentations of libraries to get it installed. That being said, we need to get the basic stuffs installed like <strong>Node.js</strong>, <strong>Visual Studio Code</strong> and <strong>Git</strong>. After that, we would require a folder to scaffold the project.</p><h4>1) Installing Vite</h4><p>I am going to run</p><pre>npm create vite@latest</pre><p>in my folder and press Y — to proceed and give a name to my project, choose <strong>vanilla</strong> (No framework) and <strong>JavaScript</strong> as the variant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*q7OJh0DKjmbrAnZn7otiuw.png" /><figcaption>Create Vite output screenshot</figcaption></figure><p>Open my project folder in vs-code. See the files and folders that <em>Vite </em>just<em> </em>created for us. I just need to run</p><pre>npm install</pre><p>to install all the dependencies and we are good to go.</p><h4>2) Installing Eslint, Stylelint and Prettier</h4><p>I used the following command to install and setup <strong>Eslint</strong> as mentioned in their documentation.</p><pre>npm init @eslint/config@latest</pre><p>After running the command, we can choose options related to our project to automatically setup the config file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*ooBwYqACZhAIcNERmm6voA.png" /></figure><p>Now that I have a linter for <strong>JavaScript</strong>, I can install <strong>Stylelint</strong> for my CSS files.</p><pre>npm init stylelint</pre><p>Now to ignore the build folder (dist) in Vite from linting. I need to make some changes to the <strong><em>.stylelintrc.json</em></strong> file.</p><pre>{<br>  &quot;extends&quot;: [&quot;stylelint-config-standard&quot;],<br>  &quot;ignoreFiles&quot;: [&quot;node_modules/**/*&quot;, &quot;dist/**/*&quot;]<br>}</pre><p>To install prettier and make formatting work, I have a few things to do.</p><pre>npm install --save-dev --save-exact prettier</pre><p>This should Install prettier.</p><pre>node --eval &quot;fs.writeFileSync(&#39;.prettierrc&#39;,&#39;{}\n&#39;)&quot;</pre><p>This will create a prettier config file.</p><pre>node --eval &quot;fs.writeFileSync(&#39;.prettierignore&#39;,&#39;# Ignore artifacts:\nbuild\ncoverage\n&#39;)</pre><p>And this will create a ignore file that will contain the list of folders and files to not format. I added <strong><em>dist</em></strong> and <strong><em>node_modules</em></strong><em> </em>to the list. Now to make <strong>Prettier</strong> and <strong>Eslint</strong> play nice together I need to run</p><pre>npm install --save-dev eslint-config-prettier</pre><p>Now I just need to edit the eslint.config.js file to add the plugin.</p><pre>import globals from &quot;globals&quot;;<br>import pluginJs from &quot;@eslint/js&quot;;<br>import eslintConfigPrettier from &quot;eslint-config-prettier&quot;;<br><br>export default [<br>  {languageOptions: { globals: globals.browser }},<br>  pluginJs.configs.recommended,<br>  eslintConfigPrettier,<br>];</pre><p>Now we have the basic stuff to get started on our website. Just add</p><pre>&quot;lint&quot;: &quot;eslint . &amp;&amp; stylelint &#39;**/*.{css,scss}&#39;&quot;,<br>&quot;format&quot;: &quot;prettier --write . --ignore-unknown&quot;</pre><p>this commands to the <strong><em>package.json </em></strong>and I can use <strong><em>npm run format</em></strong><em> </em>and <strong><em>npm run lint</em></strong> to format and lint the project respectively. I don’t like to use the eslint and prettier plugin just so they don’t intefere with all my projects, but we could use them to make the developer experience even smoother with features like format on save.</p><h4>3) Installing Husky and Lint-staged</h4><p>Now that we have the bare minimum, we could go one step further and</p><blockquote>run linters against staged git files and don’t let 💩 slip into your code base! — <a href="https://github.com/lint-staged/lint-staged">lint-staged</a></blockquote><p>I need lint-staged and husky for that.</p><pre>npm install --save-dev lint-staged</pre><pre>npm install --save-dev husky</pre><p>Now to setup husky I need to run</p><pre>npx husky init</pre><p>and add lint staged configurations inside <strong><em>package.json.</em></strong></p><pre>{<br>  &quot;name&quot;: &quot;small-website&quot;,<br>  &quot;private&quot;: true,<br>  &quot;version&quot;: &quot;0.0.0&quot;,<br>  &quot;type&quot;: &quot;module&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;dev&quot;: &quot;vite&quot;,<br>    &quot;build&quot;: &quot;vite build&quot;,<br>    &quot;preview&quot;: &quot;vite preview&quot;,<br>    &quot;lint&quot;: &quot;eslint . &amp;&amp; stylelint &#39;**/*.{css,scss}&#39;&quot;,<br>    &quot;format&quot;: &quot;prettier --write . --ignore-unknown&quot;,<br>    &quot;prepare&quot;: &quot;husky&quot;<br>  },<br>  &quot;lint-staged&quot;: {<br>    &quot;*&quot;: &quot;prettier --ignore-unknown --write&quot;,<br>    &quot;*.js&quot;: &quot;eslint --fix&quot;,<br>    &quot;*.css&quot;: &quot;stylelint&quot;<br>  },<br>  &quot;devDependencies&quot;: {<br>    &quot;@eslint/js&quot;: &quot;^9.9.0&quot;,<br>    &quot;eslint&quot;: &quot;^9.9.0&quot;,<br>    &quot;eslint-config-prettier&quot;: &quot;^9.1.0&quot;,<br>    &quot;globals&quot;: &quot;^15.9.0&quot;,<br>    &quot;husky&quot;: &quot;^9.1.4&quot;,<br>    &quot;lint-staged&quot;: &quot;^15.2.8&quot;,<br>    &quot;prettier&quot;: &quot;3.3.3&quot;,<br>    &quot;stylelint&quot;: &quot;^16.8.1&quot;,<br>    &quot;stylelint-config-standard&quot;: &quot;^36.0.1&quot;,<br>    &quot;vite&quot;: &quot;^5.4.0&quot;<br>  }<br>}</pre><p>To finish it up add the</p><pre>npx lint-staged</pre><p>command to the <strong><em>pre-commit</em></strong> file inside the <strong><em>husky</em></strong> folder. This should format and lint all the staged files before I commit.</p><h3>Really getting started</h3><p>Now that I have my development environment setup, I can go ahead and really start developing my website. I just need to run</p><pre>npm run dev</pre><p>to start the live server in my browser and just start coding my website.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fbg1MQ6IUVoVOM%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fbg1MQ6IUVoVOM%2Fgiphy.gif%3Fcid%3D790b7611eu9u14rv9ryaihdard14rudupmajkywkep38a846%26ep%3Dv1_gifs_search%26rid%3Dgiphy.gif%26ct%3Dg&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExZHF0Mnpmbm9yaWUyd3d4b2ozZndkbjZqZHFoYmY3MjRvcWJhdGsxcCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2Fbg1MQ6IUVoVOM%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ca56963fe110524d3d062cc19e7139b/href">https://medium.com/media/6ca56963fe110524d3d062cc19e7139b/href</a></iframe><p>I am just going to leave a bunch of links here for you 😊.</p><p><a href="https://vitejs.dev/">Vite | Next Generation Frontend Tooling (vitejs.dev)</a></p><p><a href="https://eslint.org/">Find and fix problems in your JavaScript code — ESLint — Pluggable JavaScript Linter</a></p><p><a href="https://stylelint.io/">Home | Stylelint</a></p><p><a href="https://prettier.io/">Prettier · Opinionated Code Formatter</a></p><p><a href="https://typicode.github.io/husky/">Husky (typicode.github.io)</a></p><p><a href="https://github.com/lint-staged/lint-staged">lint-staged/lint-staged: 🚫💩 — Run linters on git staged files (github.com)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=00a9f3226d26" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>