<?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: Matthew Rebehn</title>
    <description>The latest articles on Forem by Matthew Rebehn (@ciphercoder).</description>
    <link>https://forem.com/ciphercoder</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%2F154532%2F0f2bdc80-b385-4b2d-8745-5397473f5afc.jpeg</url>
      <title>Forem: Matthew Rebehn</title>
      <link>https://forem.com/ciphercoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ciphercoder"/>
    <language>en</language>
    <item>
      <title>9 VS Code Extensions for Web Development</title>
      <dc:creator>Matthew Rebehn</dc:creator>
      <pubDate>Thu, 09 Jan 2020 19:43:45 +0000</pubDate>
      <link>https://forem.com/ciphercoder/9-vs-code-extensions-for-web-development-5566</link>
      <guid>https://forem.com/ciphercoder/9-vs-code-extensions-for-web-development-5566</guid>
      <description>&lt;p&gt;I have been a professional Web Developer for about 3 years now. I am self-taught and have dabbled in Web technologies for much longer but I considered myself a professional when I started to sell, or provide my services for a fee.  Being self-taught, it took a long time to learn as much as I thought I needed to know to provide my services for a fee. The whole impostor syndrome hard at work.&lt;/p&gt;

&lt;p&gt;In my travels I have used many editors, with many many different extensions.  From full-fledged IDE's to starting out on Notepad ++ and just a plain Windows Text editor. In the beginning I was so lost, starting my coding journey with C and Bucky Roberts, who was a GREAT instructor, the content was just way over my head. I finally bounced around with a few different languages and landed on HTML and CSS to really get something to show up on a page that I could look at outside of the Command Line. That is what had me hooked. Actually seeing a graphical representation of code on the screen. Even if it was just some markup and styling. Then I jumped into JavaScript and never looked back.&lt;/p&gt;

&lt;p&gt;As I dive in, keep in mind, these are just a few of the extensions that I find useful in my day to day work. This is not an exhaustive list. In fact, I have over 20 extensions installed, some disabled, at any given time, however these I find I am using day to day and without them, I would be lost. &lt;/p&gt;

&lt;p&gt;I will list the extensions, then I will go on to write a little about what each of them do, how I use them, and how they can be useful to Web Developers in general.&lt;/p&gt;

&lt;p&gt;The list is not in any specific order.&lt;br&gt;
My top 9 extensions for Visual Studio Code are: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Autoprefixer&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bracket Pair Colorizer 2&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bookmarks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code Spell Checker&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GitLens&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ES7 React / Redux / GraphQL / React-Native Snippets&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Live Server&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Import Cost&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prettier &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;*Bonus - My Theme is Dark-Cipher, which is my own personal theme. I just recently published it, so check it out: &lt;a href="https://marketplace.visualstudio.com/items?itemName=Mattaz.dark-cipher"&gt;VS Code Marketplace&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;1 - &lt;a href="https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-autoprefixer"&gt;Autoprefixer&lt;/a&gt; - I am sure many of you are familiar with what Autoprefixer does, but for those who are not, this tool helps you write CSS. More specifically... browser specific CSS. Autoprefixer parses your CSS and adds vendor specific prefixes to the CSS rules you have defined. For example if you wrote CSS for:&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="nc"&gt;.example&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="m"&gt;.5s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;user-select&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nb"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will still need to add in the specific vendor prefixes for all the different browsers. This could potentially take a lot of time looking them all up and figuring out what you need to include. In the end it would look something like this:&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="nc"&gt;.example&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;-ms-grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;-webkit-transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="m"&gt;.5s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;-o-transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="m"&gt;.5s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="m"&gt;.5s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;-webkit-user-select&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       &lt;span class="nl"&gt;-moz-user-select&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;-ms-user-select&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="py"&gt;user-select&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;-webkit-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;linear&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;left&lt;/span&gt; &lt;span class="nb"&gt;top&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;left&lt;/span&gt; &lt;span class="nb"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;-o-linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;top&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nb"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Autoprefixer is the answer to this problem. It will do this work for you. The extension can also be set up to work with a specific project or an external Autoprefixer package. It can also be configured to run automatically using &lt;a href="https://gruntjs.com"&gt;Grunt&lt;/a&gt; or &lt;a href="https://gulpjs.com"&gt;Gulp&lt;/a&gt;. The easiest way to use it is,  once it is installed, go to your CSS file, press F1 and when the drop-down appears, select the Autoprefixer option and it will add all the prefixes directly to your already written CSS right in VS code. &lt;/p&gt;

&lt;p&gt;2 - &lt;a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2"&gt;Bracket Pair Colorizer 2&lt;/a&gt; - This is the newest version of the Bracket Pair Colorizer extension in the Marketplace. There is an 'original' version but when you go to the original &lt;a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer"&gt;Bracket Pair Colorizer&lt;/a&gt; listing, it informs you: "Announcement: A new version is being developed at &lt;a href="https://github.com/CoenraadS/Bracket-Pair-Colorizer-2"&gt;Bracket Pair Colorizer 2&lt;/a&gt;". This is the one I have switched to. &lt;/p&gt;

&lt;p&gt;Bracket Pair Colorizer does exactly what the name implies.  It allows matching brackets to be identified with colors; matching colors. You can even define what colors to use. This makes it very easy to see scope, in fact some of the options include choosing a border style to highlight active scope. You can also show active scope in the gutter which is how I currently have my settings. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2WJMxnEz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/mattaz/image/upload/v1577668384/Projects/Selection_001_xjmrbl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2WJMxnEz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/mattaz/image/upload/v1577668384/Projects/Selection_001_xjmrbl.png" alt="Screenshot of Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see in the screenshot, the brackets are in the gutter as well as a line connecting them on the page to make it easier. The brackets' color also matches. This is just the way I set it up and as I said, there are many different ways to do it. This makes reading and even working with the code so much easier since in just a glance, you can see where you are at.  &lt;/p&gt;

&lt;p&gt;3 - &lt;a href="https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks"&gt;Bookmarks&lt;/a&gt; - This extension makes it very easy to navigate a large codebase. You can mark and un-mark positions in your code so you are able to navigate to and from whatever point you set up. Name them and see a list of all the bookmarks you set. It adds an icon to the side bar that when clicked, will show you all the bookmarks. I personally have a few websites from restaurants. They ask me to change their specials frequently, which I have found to be another great use case. I set a bookmark at the start of their specials in the code and that way, anytime I open the project I can go to the sidebar, see all the bookmarks, and navigate right to the spot where their weekly specials are and I change them without having to hunt through the entire index page looking for that spot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KdS5dVbL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/mattaz/image/upload/v1577717870/Projects/Selection_002_kszcqu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KdS5dVbL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/mattaz/image/upload/v1577717870/Projects/Selection_002_kszcqu.png" alt="Screenshot of Bookmarks in Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The screenshot is actually from one of the restaurant projects, with the specials that need to be changed. As you can see there is an icon in my sidebar just for bookmarks, the bookmark is actually able to be given a name, and it shows up in the gutter as well. With a simple cmd/control + shift+ P, then start typing bookmarks, and all the options begin to show up. &lt;/p&gt;

&lt;p&gt;4 - &lt;a href="https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker"&gt;Code Spell Checker&lt;/a&gt; -  I am, and always have been, awful at spelling. Sometimes it is so bad that even the spell checker has no suggestions and I have to manually look it up... Luckily for me, and loads of other like me, they make software for spelling. Software that will actually check what you have already written and see if all the words are spelled correctly. Not just in word documents either. This extension is specifically for code projects. In fact, the first line of their listing in the Marketplace is: "A basic spell checker that works well with camelCase code." I know that when I am building a website for a client, I do not want spelling mistakes in it. Especially when it is launched. How many times have you been looking at a website, and stumbled on a misspelled word? Or better yet, you get a website launched, and within a week you have multiple emails from the grammar police about a misspelling on your newly launched website. Embarrassing.&lt;/p&gt;

&lt;p&gt;This extension takes care of all those spelling problems. I also really like that you can add custom dictionaries either globally or on a project level. So if you are building a website for an industry with some crazy words you can just add a project level &lt;code&gt;.txt&lt;/code&gt; file and point your spell checker to that file. Words that are not in the dictionary and misspelled, will have a squiggly underline. The extension will make suggestions as to what the correct word should be. A list of misspellings will also show up in the Problems Console at the bottom of the editor. You can then see the entire list and click on them one by one to be brought directly to the word. You can enable and disable different file types and it can be installed in different languages.&lt;/p&gt;

&lt;p&gt;5 - &lt;a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens"&gt;GitLens&lt;/a&gt; - This extensions allows you to "Supercharge the Git capabilities built into VS Code". It lets you visualize code authorship, navigate and explore Git repo's, go back through history, and much much more. Here is a small list from their marketplace listing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Current Line Blame&lt;/li&gt;
&lt;li&gt;Authorship Code Lens&lt;/li&gt;
&lt;li&gt;Line History View&lt;/li&gt;
&lt;li&gt;Side Bar Views

&lt;ol&gt;
&lt;li&gt;Repositories View&lt;/li&gt;
&lt;li&gt;File History View&lt;/li&gt;
&lt;li&gt;Line History View&lt;/li&gt;
&lt;li&gt;Search Commits View&lt;/li&gt;
&lt;li&gt;Compare View&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;li&gt;Gutter Blame - on demand&lt;/li&gt;
&lt;li&gt;Gutter Heatmap - on demand&lt;/li&gt;
&lt;li&gt;Recent Changes - on demand&lt;/li&gt;
&lt;li&gt;Many Powerful Commands&lt;/li&gt;
&lt;li&gt;User-defined modes to toggle between settings&lt;/li&gt;
&lt;li&gt;Much Much More!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is all offered for free too!!! This extension is &lt;a href="https://github.com/eamodio/vscode-gitlens"&gt;open-source&lt;/a&gt; and is always looking for any kind of support. If you use Git, you could benefit from this extension. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6yvzc7fF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/mattaz/image/upload/v1577816094/Projects/Selection_003_vqxls1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6yvzc7fF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/mattaz/image/upload/v1577816094/Projects/Selection_003_vqxls1.png" alt="Screenshot of GitLens"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see my cursor is on line 172, which shows who made the last changes to that line of code. It was me, 8 months ago and it even includes the Git commit message. If you look at the bottom, you can see the Status Bar Blame. There is so much more to this extension, please check their website at &lt;a href="https://gitlens.amod.io/"&gt;GitLens&lt;/a&gt; to see all of what it has to offer. &lt;/p&gt;

&lt;p&gt;6 - &lt;a href="https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets"&gt;ES7 React / Redux / GraphQL / React-Native Snippets&lt;/a&gt; - I use this extension daily. It provides all those snippets we use over and over. For instance, if you start typing &lt;code&gt;imr&lt;/code&gt; then hit &lt;code&gt;tab&lt;/code&gt;, it will write &lt;code&gt;import React from 'react'&lt;/code&gt;. How many times in a project do you actually write that out? I was doing it a lot! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V7cwY0Cl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://res.cloudinary.com/mattaz/image/upload/v1578359719/Projects/imrScreenshot_a9ngih.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V7cwY0Cl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://res.cloudinary.com/mattaz/image/upload/v1578359719/Projects/imrScreenshot_a9ngih.gif" alt="Insert Snippet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The snippets extension offers a lot more than just &lt;code&gt;imr&lt;/code&gt;. If you check the listing in the &lt;a href="https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets"&gt;VS Code marketplace&lt;/a&gt;, there is a list of them. It has everything from 'Basic Methods'  to 'React', and 'React Hooks', 'React Native', 'Redux', 'Prop Types', and much more. Simple and short, three to five letter abbreviations that when typed, will trigger useful snippets on &lt;code&gt;tab&lt;/code&gt;. There is also a feature to search through the snippets by using &lt;code&gt;cmd/ctr + shift + p&lt;/code&gt; then start typing ES7 and it will pop up. &lt;/p&gt;

&lt;p&gt;7 - &lt;a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer"&gt;Live Server&lt;/a&gt; - A local development server that has live reload for static and dynamic pages which makes it a very useful tool. It can be used for all different types of files. I use it for my static HTML files. There are a few different ways to start it, but I usually just use the easiest. In VS code, if you go to the Explorer and just right click on an HTML file, an option will come up to open it using Live Server. You can configure what browser it automatically opens it in, and if you don't it will just open it in your default browser. Once it is open, live reload kicks in and you can then make changes to that file and it will be reflected in the browser. When it is running, you can start and stop it in the status bar at the bottom and it features a lot of other options and configurations. I have many projects that I built and still maintain that are not huge Node or Framework projects. Just plain HTML, CSS, and JS. Not even a &lt;code&gt;package.json&lt;/code&gt; and this &lt;a href="https://github.com/ritwickdey/vscode-live-server"&gt;Live Server&lt;/a&gt; is perfect for them. &lt;/p&gt;

&lt;p&gt;8 - &lt;a href="https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost"&gt;Import Cost&lt;/a&gt; - Displays the size of the package you are importing at the end of the import statement. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o4o9QmXq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/mattaz/image/upload/v1578365149/Projects/importCost_nmohxw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o4o9QmXq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/mattaz/image/upload/v1578365149/Projects/importCost_nmohxw.png" alt="Import Cost"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This package was made by the people over at Wix. It is &lt;a href="https://github.com/wix/import-cost"&gt;Open Source&lt;/a&gt;, and seems to have a pretty active community. Every time you create a component and import a package, it is going to tell you how big it is. I have noticed that some of the packages, and some local packages it will not pick up the size, but generally it gives an excellent idea or estimate of the package size coming in. It makes it easy to track bloat and the potential size of projects. This is important when building projects of any size. &lt;/p&gt;

&lt;p&gt;9 - &lt;a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode"&gt;Prettier&lt;/a&gt; - The last extension on my list is a great extension called Prettier. This is a popular program and it can be used as a VS Code extension or it can be used in your individual programs with Yarn or NPM. It can also be used both ways and it can be coupled with ES Lint. Prettier is listed on their website as, "An opinionated code formatter". It helps make your code look pretty. It supports many different languages and integrates with just about all the editors out there. It makes it easy to collaborate on projects with multiple authors. Everyone has their own style of writing code. However, when you are working in a large code base you want all your committed code to conform to a specific style. In it's docs it describes Prettier's actions as, "It removes all original styling and ensures that all outputted code conforms to a consistent style." &lt;/p&gt;

&lt;p&gt;You are able to define specific rules for your written code. It can then be integrated into your pipeline or even just on save. Once you make a &lt;code&gt;.prettierrc&lt;/code&gt; file with all of your rules, you can apply them globally or on a project to project basis. &lt;/p&gt;

&lt;p&gt;These are some of my favorite and most used extensions. If you have not yet tried &lt;a href="https://code.visualstudio.com/"&gt;Visual Studio Code&lt;/a&gt;, install it and give a try. You will not be sorry. If you are new to Web Development, be sure to check these extensions out and if you have been doing it for a while and are not using these... consider them too. VS Code has a vast array of different extensions and their &lt;a href="https://code.visualstudio.com/api"&gt;extensions API&lt;/a&gt; is very easy to work with. If you have an idea for one, check out how easy it is to integrate. &lt;/p&gt;

</description>
      <category>vscode</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>AWS-CLI on Windows Subsystem Linux</title>
      <dc:creator>Matthew Rebehn</dc:creator>
      <pubDate>Sun, 14 Jul 2019 15:13:10 +0000</pubDate>
      <link>https://forem.com/ciphercoder/aws-cli-on-windows-subsystem-linux-29pl</link>
      <guid>https://forem.com/ciphercoder/aws-cli-on-windows-subsystem-linux-29pl</guid>
      <description>&lt;h1&gt;
  
  
  Adding awscli to Windows Subsystem Linux
&lt;/h1&gt;

&lt;p&gt;To start off, I am using Windows 10 OS which is updated to its most recent updates, I also have Windows Subsytem Linux, (WSL), installed. On WSL, I am using the Ubuntu flavor, version 18.04, though this should not have any impact on what we are about to do. I struggled for a while attempting to find the correct answer as to why I kept getting an error after installing the &lt;a href="https://aws.amazon.com/cli/" rel="noopener noreferrer"&gt;Amazon Web Services Command Line Interface&lt;/a&gt;, or awscli on WSL. The error I kept getting was:&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%2Fgdemlu2c496gg9zyhbra.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%2Fgdemlu2c496gg9zyhbra.png"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Error Message Progression&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When I first started using this machine as my primary developer machine, I came from Linux, which has a lot of tools installed by default that Windows does not. For instance, Python comes already installed and ready to use on Linux. I use Python for a variety of things as well as the Python package installer, pip, so when I started with this computer I installed them right away. Not sure if this makes a difference but I at least want to be able to duplicate my environment in case anyone else is struggling with this. After installing python, both versions, 2.X.X and 3.X.X, as well as pip, since they are two different programs, I made sure to do it right and add it to my 'path' or Windows environment variables so it can be found. After that, I installed NPM and a variety of other tools including the awscli, WSL, GIT, and a few more. After installing all of this through PowerShell I realized after poking around, that I could have a Linux 'environment' called Windows Subsystem Linux. Since Linux is what I was used to and felt most comfortable with, I set out to install WSL. I wanted to use WSL for all of the things I had just loaded on my machine through PowerShell, so I had to duplicate a lot of my work. I made sure python 2.X.X and 3.X.X were installed on WSL. Since WSL is similar to a virtual machine or a distro all to itself - or a 'subsystem' - I was not sure if I could share these tools between the two environments. I have set up dual boot machines as well as virtual machines before and the explanations I read made it sound like it favored these kinds of an environment. I installed pip, Node, NPM, GIT, and all the other stuff I was using at the time onto WSL.  One of the programs I use is the awscli.  This allows you to interact with AWS or Amazon Web Services. I use their &lt;a href="https://aws.amazon.com/s3/" rel="noopener noreferrer"&gt;S3 storage&lt;/a&gt; as well as &lt;a href="https://aws.amazon.com/cloudfront/" rel="noopener noreferrer"&gt;CloudFront&lt;/a&gt;, and &lt;a href="https://aws.amazon.com/route53/" rel="noopener noreferrer"&gt;Route 53&lt;/a&gt;, and a few other services. Being able to interact with these services via CLI is imperative for me. &lt;/p&gt;

&lt;p&gt;After installing the awscli to Ubuntu WSL, I continued to get the same error as shown in the screenshot above. No matter what I did I seemed to continue getting this error. The last thing the error says is: &lt;code&gt;no such file or directory&lt;/code&gt;, so this is where I started. I traced the file location and confirmed there is actually such a file. Now I looked at the &lt;code&gt;bad interpreter:&lt;/code&gt; portion of the error message. My first thought is what does this even mean! 'Bad interpreter - no such file' - WHAT? The file is there. I can see it is there. That is when I set in to Google. I got a lot of Mac related results and a few that referred to Windows. Attempting to decipher those results was difficult since there seemed to be so many different 'solutions' depending on all the different environment setups. As you can see from the screenshot I use ZSH as my shell of choice instead of Bash so this was throwing me off some too.&lt;/p&gt;

&lt;p&gt;I was able to recognize a few patterns all the 'solutions' had in common and just started trying different things. The Windows file system displays its path to a file differently than Linux. On Windows the path is represented this way: &lt;code&gt;C:\Users\Matth\AppData\Local&lt;/code&gt; and on Linux the path is represented &lt;code&gt;/usr/bin/python&lt;/code&gt;. This was throwing things off and it could not find the file. As you can see from the screenshot, I tried just about every different combination trying to get it to find the file. Finally, it dawned on me that I had installed python on Windows as well as on WSL. Once I figured out which python instance it was attempting to use by issuing the &lt;code&gt;which python&lt;/code&gt; command, it returned &lt;code&gt;/usr/bin/python&lt;/code&gt;. That told me it was using the WSL installed version of python. &lt;/p&gt;

&lt;p&gt;At this point I was able to trace the path back to &lt;code&gt;C:\Users\Matth\AppData\Local\Programs\Python\Python37\Scripts\aws&lt;/code&gt; where the actual awscli file lived. The very first line, (see screenshot below), of the file starts with &lt;code&gt;#!/mnt/c/Users/Matth/AppData/Local/Programs/Python/Python37/Scripts/aws&lt;/code&gt;. Just looking at this path I could tell this was the problem. I use Hyper for a terminal and in that terminal I have it set up to default to the zsh shell installed on WSL. This is why in the path there is the first '/mnt' and the rest is self explanatory. Once in the file I just kept changing the URL until I could get it to work correctly. After I figured out it was attempting to use the python installation from WSL &lt;code&gt;/usr/bin/python&lt;/code&gt; I just used that for the URL on Line 1 of the awscli file and it worked immediately after that.&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%2Fyytb0mbofxtk8qr31w4s.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%2Fyytb0mbofxtk8qr31w4s.png"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;AWS Config File&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This was a really convoluted way to get it to work. I am confident there are other ways to do this. In fact, there are probably more 'economical' ways to do this. You may be able to use the python installation from the host OS, being Windows, but this seemed to be the easiest way to get this done so I can continue to work. &lt;/p&gt;

</description>
      <category>aws</category>
      <category>howto</category>
      <category>cli</category>
    </item>
    <item>
      <title>Pretty URL's with AWS s3</title>
      <dc:creator>Matthew Rebehn</dc:creator>
      <pubDate>Tue, 14 May 2019 20:05:57 +0000</pubDate>
      <link>https://forem.com/ciphercoder/pretty-url-s-with-aws-s3-2eme</link>
      <guid>https://forem.com/ciphercoder/pretty-url-s-with-aws-s3-2eme</guid>
      <description>&lt;h1&gt;
  
  
  Make your URL's pretty on Amazon S3
&lt;/h1&gt;

&lt;p&gt;I host multiple websites on &lt;a href="https://aws.amazon.com/s3/"&gt;Amazon s3 Static site hosting&lt;/a&gt;. They offer a great product for an extremely reasonable price. They even offer a &lt;a href="https://aws.amazon.com/free/"&gt;free tier&lt;/a&gt;, though there are some requirements. It is definitely worth checking out. There is a decent learning curve, but it is not impossible. I was able to figure it out as a newbie with a decent amount of searches and just reading their docs.&lt;/p&gt;

&lt;p&gt;I set my first couple sites up using all of their services, with the exception of the domain, which I got from &lt;a href="https://www.namecheap.com/"&gt;Namecheap&lt;/a&gt;. I used their S3 buckets, CloudFront, and Route 53. After setting my sites up, one of the problems I noticed was the URL's of the website had the .html on the end. Once my domain was set up, the homepage was the only page that did not have .html at the end. I wanted to get rid of this and so I set out on a mission to do so. &lt;/p&gt;

&lt;p&gt;I started searching their docs, which are massive, and really don't respond to the words 'pretty url', so I set out with my search engine and came to a few excerpts on Stack Overflow on how to do this, but not really an in depth explanation. Now, the sites I am trying to clean the URL's for are business websites that I would rather not have go down while I am trying to do this. I was able to stitch together a few main points that the different excerpts had in common and figure it out. But since I was confused while doing it, I figured I would put this together for anyone else.&lt;/p&gt;

&lt;p&gt;I am going to start with an already set up site. If you want to know how to set up the site please reference this article by &lt;a href="https://miketabor.com/host-static-website-using-aws-s3/"&gt;Mike Tabor&lt;/a&gt; which I found to be the most helpful.&lt;/p&gt;

&lt;p&gt;Once your site is set up, you have your bucket with all your files listed. When you initially set it up, you had to select an 'index document', which I set to 'index.html'. This does not change. My site was structured similar to this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8EkTTT3g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jjbxby06358cuv6utlxv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8EkTTT3g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/jjbxby06358cuv6utlxv.png" alt="Initial Setup"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;You can see all the files had the .html after their name. My 'index document' was &lt;code&gt;index.html&lt;/code&gt; which again, I left as such. The first thing I did was went through all the other pages, under their 'Properties' tab and confirmed the metadata had them listed as 'text/html'. If it doesn't, you will need to set it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uQMmeq70--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/c6dd68u49c0vjdfdoroa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uQMmeq70--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/c6dd68u49c0vjdfdoroa.png" alt="Metadata"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After confirming that, I had to go to the code. The website I did this on was eight pages and I had to tediously go through every page and change every single 'href' to read &lt;code&gt;&amp;lt;a href="/gallery"&amp;gt;Gallery&amp;lt;/a&amp;gt;&lt;/code&gt; leaving off the .html on every single link, instead of the original &lt;code&gt;&amp;lt;a href="/gallery.html"&amp;gt;Gallery&amp;lt;/a&amp;gt;&lt;/code&gt;. I used the 'find and replace' tool in VS Code to do it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SXsm6bnV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2252y5rg0m1cebwesj31.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SXsm6bnV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2252y5rg0m1cebwesj31.png" alt="VS Code find and replace"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I did this on every page, for every link, until all links, for any kind of internal navigation on my site were set up to the &lt;code&gt;&amp;lt;a href="/gallery"&amp;gt;Gallery&amp;lt;/a&amp;gt;&lt;/code&gt; instead of the original way. This will break the navigation if you try to preview the site in a browser without it being hosted on AWS. So remember that if you are updating the site or working on it and previewing it in a browser. You will have to preview each page individually instead of clicking through the navigation. &lt;/p&gt;

&lt;p&gt;Then, you will have to re-upload all the pages you changed. Once you upload everything, it will look as it originally did. Now on Amazon, in your website's bucket, go through all the pages and 'rename' the pages, leaving off the '.html'. It should now look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YspGvgcn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vdvsn7ul8uhh680qz0du.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YspGvgcn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vdvsn7ul8uhh680qz0du.png" alt="AWS Renamed"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once this was done I noticed upon internal navigation, that when you click from another page back to the homepage, it would show up as &lt;a href="http://www.mysite.com/index.html"&gt;www.mysite.com/index.html&lt;/a&gt;. To fix this, I went ahead and uploaded a duplicate index.html page and changed the name to just 'index' so now it will internally navigate to &lt;a href="http://www.mysite.com/index"&gt;www.mysite.com/index&lt;/a&gt;. Just note, when you upload the second index page, make sure to rename it to 'index1.html', or something different, prior to uploading, or it will just replace the 'index.html' page already in your bucket. Once uploaded, rename 'index1.html' to just 'index'. It should now look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y3M6Wkda--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6phcv4hx6ggwv710aowg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y3M6Wkda--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6phcv4hx6ggwv710aowg.png" alt="Double index page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;strong&gt;&lt;em&gt;Edit&lt;/em&gt;&lt;/strong&gt;*&lt;br&gt;
After this was up for a while I got a notification saying I had duplicate pages. So this trick with the &lt;code&gt;index.html&lt;/code&gt; page did not work. So I changed tactics and all I did to get rid of that &lt;code&gt;index.html&lt;/code&gt;, was back in the code, I changed all the links going to the index.html page, to the actual website &lt;code&gt;https://example.com&lt;/code&gt; and left it as an external link. Everything else, I left the same, and it all works seamlessly.&lt;/p&gt;

&lt;p&gt;Once this is done, you are in the home stretch. If you just leave it the way it is, depending on how your cache is set up or how you have it hosted, it will eventually work correctly. My site is set up with Amazon's default cache policy, so it will only check back once every 24 hours. Since this was a business website, I had to see if this worked right away. I went ahead and created an invalidation for every single page that I changed so I would know if what I did broke the site, or worked correctly. To do that, head over to CloudFront, select the correct distribution, then along the top, select the tab labeled 'Invalidations'. Click on the blue button to 'Create Invalidation' and fill in all the pages you changed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Zrt7R_5g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3o46m7tdvtgt05350b7f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Zrt7R_5g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3o46m7tdvtgt05350b7f.png" alt="Create the invalidation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once this is done invalidating all the pages, navigate to your site and check it out. Remember to clear your browsers cache so if you looked at the site recently it won't serve you a stale copy from the cache. &lt;/p&gt;

&lt;p&gt;I hope this was helpful.&lt;/p&gt;

</description>
      <category>amazon</category>
      <category>s3</category>
      <category>howto</category>
    </item>
  </channel>
</rss>
