<?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: Alexey Okhrimenko</title>
    <description>The latest articles on DEV Community by Alexey Okhrimenko (@obenjiro).</description>
    <link>https://dev.to/obenjiro</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%2F179718%2F3ec2108c-336c-4694-a21f-2bc0723b0b8c.jpeg</url>
      <title>DEV Community: Alexey Okhrimenko</title>
      <link>https://dev.to/obenjiro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/obenjiro"/>
    <language>en</language>
    <item>
      <title>There is one more Google Developer Expert in the world! :)</title>
      <dc:creator>Alexey Okhrimenko</dc:creator>
      <pubDate>Sat, 29 Aug 2020 11:23:40 +0000</pubDate>
      <link>https://dev.to/obenjiro/there-is-one-more-google-developer-expert-in-the-world-12bi</link>
      <guid>https://dev.to/obenjiro/there-is-one-more-google-developer-expert-in-the-world-12bi</guid>
      <description>&lt;p&gt;I am pleased to share with you the news that I have received the official title of Angular GDE. This gives new opportunities, but with it comes with even greater responsibility.&lt;/p&gt;

&lt;p&gt;What is GDE? Google Developers Experts is a global network of tech experts, influencers, and influencers who actively support developers, businesses, and tech communities by speaking at events and posting content. These professionals actively contribute to and support developer and startup ecosystems around the world, helping them create and launch innovative applications.&lt;/p&gt;

&lt;p&gt;About 700 experts represent 18+ Google technologies around the world! In my case, this technology is Angular. The GDE title does not mean that I work with Google or that Google gave me money :) It just means that Google recognizes my expertise in Angular.&lt;/p&gt;

&lt;p&gt;GDE is getting:&lt;br&gt;
1) Google Recognition&lt;br&gt;
2) Ability to communicate with Angular developers and other Google teams&lt;br&gt;
3) Access to closed groups of GDE experts&lt;br&gt;
4) Invitations to events (aka a trip to Google I / O)&lt;/p&gt;

&lt;p&gt;Here are some of the things that Google noted in my work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I have worked with the earliest versions of Angular (2.x) (before it became popular)&lt;/li&gt;
&lt;li&gt;Created one of the largest Russian-speaking Angular community with more than 5 thousand developers &lt;a href="https://t.me/angular_ru"&gt;https://t.me/angular_ru&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Together with Tinkoff, organized more than 17 Angular meetups in Moscow and the regions. I helped people with the preparation of talks &lt;a href="https://www.youtube.com/channel/UCpDTAtunmHBcI6CsJoUV7ww/videos"&gt;https://www.youtube.com/channel/UCpDTAtunmHBcI6CsJoUV7ww/videos&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Co-organized the first in Russia NgGirls &lt;a href="https://ng-girls.org/moscow-2019/"&gt;https://ng-girls.org/moscow-2019/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;In collaboration with JetBrains, has awarded over 20 licenses for InteliJ products among Angular developers.&lt;/li&gt;
&lt;li&gt;Gave more than 30 talks (including talks on Angular) &lt;a href="https://github.com/Semigradsky/events/blob/master/speakers.md#by-the-count-of-talks-more-than-one"&gt;https://github.com/Semigradsky/events/blob/master/speakers.md#by-the-count-of-talks-more-than-one&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Made (with the help of the community) the Russian-language Angular documentation &lt;a href="https://angular24.ru/"&gt;https://angular24.ru/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Developed a fairly popular plugin (more than 1700 developers have already installed it) for automatic refactoring of Angular components &lt;a href="https://marketplace.visualstudio.com/items?itemName=obenjiro.arrr"&gt;https://marketplace.visualstudio.com/items?itemName=obenjiro.arrr&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Author of Russian-language articles on Medium &lt;a href="https://medium.com/@obenjiro"&gt;https://medium.com/@obenjiro&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Author of Russian-language articles on Habr &lt;a href="https://habr.com/ru/users/obenjiro/posts/"&gt;https://habr.com/ru/users/obenjiro/posts/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The author of the Russian-language Telegram channel &lt;a href="https://t.me/obenjiro_notes"&gt;https://t.me/obenjiro_notes&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Author of the English-language Twitter blog &lt;a href="https://twitter.com/obenjiro"&gt;https://twitter.com/obenjiro&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Author of English-language articles on dev.to &lt;a href="https://dev.to/obenjiro"&gt;https://dev.to/obenjiro&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But I do not plan to stop there. Already now I am actively working on improving the quality of the Russian-language Angular documentation, developing Granula (an alternative Runtime for Angular) and Reagain (a tool for static analysis of the code base). I will also do my best to enlarge Angular community and make it soft and fluffy for everyone :)&lt;/p&gt;

&lt;p&gt;Subscribe to my (RU) Telegram channel &lt;a href="https://t.me/obenjiro_notes"&gt;https://t.me/obenjiro_notes&lt;/a&gt; or (ENG) Twitter blog &lt;a href="https://twitter.com/obenjiro"&gt;https://twitter.com/obenjiro&lt;/a&gt; to always keep abreast of my latest developments and articles;)&lt;/p&gt;

</description>
      <category>angular</category>
      <category>gde</category>
    </item>
    <item>
      <title>ARRR or how to refactor components automatically</title>
      <dc:creator>Alexey Okhrimenko</dc:creator>
      <pubDate>Tue, 18 Aug 2020 10:11:41 +0000</pubDate>
      <link>https://dev.to/obenjiro/arrr-or-how-to-refactor-components-2mce</link>
      <guid>https://dev.to/obenjiro/arrr-or-how-to-refactor-components-2mce</guid>
      <description>&lt;p&gt;🛠 Have a bunch of legacy code written in Angular and React? Decided to decompose a component and tired of just thinking about it?&lt;/p&gt;

&lt;p&gt;Try ARRR (Angular) and Glean (React) - VSCode plugins that allow you to export a piece of code into a new component with its own HTML, CSS, TS and spec files.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FG2jlPdg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s6ufmd66dmosbpc3lgfh.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FG2jlPdg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/s6ufmd66dmosbpc3lgfh.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;☠️ Let's refARRRctor it!&lt;/p&gt;

&lt;p&gt;For Angular (ARRR)&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=obenjiro.arrr"&gt;[link]&lt;/a&gt; &lt;a href="https://github.com/obenjiro/vscode-arrr"&gt;[repo]&lt;/a&gt;&lt;br&gt;
For React (Glean)&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=wix.glean"&gt;[link]&lt;/a&gt;  &lt;a href="https://github.com/wix/vscode-glean"&gt;[repo]&lt;/a&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>react</category>
      <category>cleancode</category>
      <category>javascript</category>
    </item>
    <item>
      <title>HTML to Angular/React app in single command</title>
      <dc:creator>Alexey Okhrimenko</dc:creator>
      <pubDate>Mon, 03 Aug 2020 16:24:07 +0000</pubDate>
      <link>https://dev.to/obenjiro/html-to-angular-react-app-in-single-command-17gi</link>
      <guid>https://dev.to/obenjiro/html-to-angular-react-app-in-single-command-17gi</guid>
      <description>&lt;p&gt;Having a large chunk of HTML and want to convert it to app?&lt;/p&gt;

&lt;p&gt;Just augment it with &lt;em&gt;data-component&lt;/em&gt; attribute and run a single cli command:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Rsh-Hys4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kru7mdwlr365wyst6cl5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rsh-Hys4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kru7mdwlr365wyst6cl5.gif" alt="Alt Text" width="600" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For Angular (&lt;a href="https://github.com/obenjiro/create-angular-components"&gt;link&lt;/a&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-angular-components ./index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For React (&lt;a href="https://github.com/roman01la/html-to-react-components"&gt;link&lt;/a&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx html-to-react-components ./index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🧙🏻‍♂️ Magic :)&lt;/p&gt;

</description>
      <category>html</category>
      <category>angular</category>
      <category>react</category>
      <category>cli</category>
    </item>
    <item>
      <title>PifuHD: 3D avatar from 1 image (well... almost)</title>
      <dc:creator>Alexey Okhrimenko</dc:creator>
      <pubDate>Tue, 07 Jul 2020 08:08:00 +0000</pubDate>
      <link>https://dev.to/obenjiro/pifuhd-3d-avatar-from-1-image-well-almost-kel</link>
      <guid>https://dev.to/obenjiro/pifuhd-3d-avatar-from-1-image-well-almost-kel</guid>
      <description>&lt;p&gt;Recently, &lt;a href="https://gdg-devparty.ru/"&gt;GDG DevParty Russia&lt;/a&gt; was held at which, in addition to talk on &lt;a href="https://youtu.be/UB2XK7Cf-Ms?list=PLGlZ_ld11os-nnB5CG_p6brIUWMGXU5Tr"&gt;MagicString&lt;/a&gt; library, there was a report by &lt;a href="https://twitter.com/Lik04ka"&gt;Vasilika Klimova&lt;/a&gt; on the possibilities of WebGL in the browser “Let's dance?”. In it, she talked about how to create a 3D avatar, and then animate it directly in the browser. The problem is that the avatar is created using a huge device called &lt;em&gt;"Shapify Booth"&lt;/em&gt;. Cool if you have access and some extra money for this kind of entertainment, but what if not? :)&lt;/p&gt;

&lt;p&gt;Thanks to the achievements of Machine Learning, we have an alternative. Facebook Research published a work called &lt;a href="https://shunsukesaito.github.io/PIFuHD/"&gt;PifuHD&lt;/a&gt;. Using it, we can create a 3D avatar from single image 😱&lt;br&gt;
To do this, find 1 full-body-length photograph of yourself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QPugUcX3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j5p7co213vdnh2gcvutj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QPugUcX3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j5p7co213vdnh2gcvutj.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, open Google Colab (&lt;a href="https://colab.research.google.com/drive/11z58bl3meSzo6kFqkahMa35G5jmh2Wgt"&gt;via the link&lt;/a&gt;) (better to do this in Google Chrome) and follow the instructions. If you get confused, watch the video.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/LWDGR5v3-3o"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Literally in 5-10 minutes you will have your own 3D avatar from the picture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Av2u6hK2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0fzmjarbb0cb10d7jg2p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Av2u6hK2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0fzmjarbb0cb10d7jg2p.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But that is not all! Stitching 2 photos into one (front &amp;amp; back), thereby preparing the texture for our avatar&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a4jn_yY1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/06awr1wi5l5mmonxwf9s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a4jn_yY1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/06awr1wi5l5mmonxwf9s.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and watching a couple of videos about an easy way to texture a 3D model in &lt;a href="https://www.blender.org"&gt;Blender&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/kERzhJKYvGo"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/WFN8zn_7PZk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;We can create a textured model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XHVh66Y---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/x23p79yffwb1rjkldb51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XHVh66Y---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/x23p79yffwb1rjkldb51.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Having exported all this in FBX format and creating an archive in which the fbx file and texture file will lie, we can import this archive into &lt;a href="https://www.mixamo.com"&gt;Mixamo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nd22s5h_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xqt4ci2rbd7d7tnkgn3r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nd22s5h_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xqt4ci2rbd7d7tnkgn3r.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In which we can choose the appropriate animation to poison it in &lt;a href="https://www.adobe.com/ru/products/aero.html"&gt;Adobe Aero&lt;/a&gt; where we are already substituting our model in a suitable environment to get just such an animation 😅&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/-9D0AQ0wTEs"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Well, after a bit of training, I’ll finally deal with my inner self.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/6B9r0nFIzps"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Of course, the quality of the models leaves much to be desired and sometimes even an obvious picture gives a huge number of artifacts. PifuHD is especially bad with hands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0wWeNGb7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qzzi4ftiv3kxy2wzc7zl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0wWeNGb7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qzzi4ftiv3kxy2wzc7zl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And texturing/animating will take you more than 10 minutes, especially for the first time (it took me 6 hours), but with a little training you can make a lot of cool animations and maybe even a simple game :)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What a time to be alive! (c)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Subscribe to my twitter &lt;a href="https://twitter.com/obenjiro"&gt;https://twitter.com/obenjiro&lt;/a&gt; and Telegram chat TensorflowJS to always be up to date with the latest ML &lt;a href="https://t.me/tensorflowjs_en"&gt;https://t.me/tensorflowjs_en&lt;/a&gt;&lt;/p&gt;

</description>
      <category>3d</category>
      <category>ar</category>
      <category>machinelearning</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The silence of the FANS - part #1 - Google Colab Javascript QuickStart</title>
      <dc:creator>Alexey Okhrimenko</dc:creator>
      <pubDate>Mon, 17 Feb 2020 18:12:49 +0000</pubDate>
      <link>https://dev.to/obenjiro/silence-of-the-fans-part-1-javascript-quickstart-5f3m</link>
      <guid>https://dev.to/obenjiro/silence-of-the-fans-part-1-javascript-quickstart-5f3m</guid>
      <description>&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%2Fi%2F7kj9t4rvhagz23d2lpog.gif" 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%2Fi%2F7kj9t4rvhagz23d2lpog.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Google have awesome service called Google Colab. It is a free (with some limitations, so you can't use it for production) cloud service, based on Jupyter Notebook. It provides a service for machine learning and free-of-charge access to a blazingly fast GPU and TPU.&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%2Fi%2Fg4tzivokqm1945f7xaz9.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%2Fi%2Fg4tzivokqm1945f7xaz9.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With this service, you can easily train your model within seconds. It dose supports Python2 and Python3 out of the box, so everything should be good right?&lt;/p&gt;

&lt;h2&gt;
  
  
  No! I want JavaScript
&lt;/h2&gt;

&lt;p&gt;But there is one problem. There is no native support in Google Colab for javascript. Thankfully I was able to hack it. Thanks to the research done in this thread (&lt;a href="https://github.com/googlecolab/colabtools/issues/13" rel="noopener noreferrer"&gt;https://github.com/googlecolab/colabtools/issues/13&lt;/a&gt;) and some mad javascript science we can actually use Google Colab, TensorflowJs and JavaScript together&lt;/p&gt;

&lt;h2&gt;
  
  
  QuickStart
&lt;/h2&gt;

&lt;p&gt;I have created a template that will help you to start, just open this link&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tinyurl.com/tf-js-colab" rel="noopener noreferrer"&gt;https://tinyurl.com/tf-js-colab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And clone it to you Google Drive with "Save a copy in Drive..." command&lt;br&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%2Fi%2Faa83k1g9ypg44moso6o4.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%2Fi%2Faa83k1g9ypg44moso6o4.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you have your own copy of this Jupyter Notebook on your Google Drive. Execute first cell and hit F5. And thats it! 🎉🎉🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;p&gt;You will probably see this message "Unrecognized runtime javascript; defaulting to python". Don't panic! This is happening because our template uses "javascript" kernel for Jupyter notebook, but since you just created this notebook your instance (your computer/server) that is assigned to you simple doesn't have it installed.&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%2Fi%2Fvjoocp20y8q6smzo5h3w.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%2Fi%2Fvjoocp20y8q6smzo5h3w.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's fix this by running the first cell&lt;/p&gt;

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

&lt;span class="o"&gt;!&lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; npm@latest
&lt;span class="o"&gt;!&lt;/span&gt;npm cache verify
&lt;span class="o"&gt;!&lt;/span&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="nt"&gt;--unsafe-perm&lt;/span&gt; ijavascript
&lt;span class="o"&gt;!&lt;/span&gt;ijsinstall &lt;span class="nt"&gt;--install&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;global
&lt;span class="o"&gt;!&lt;/span&gt;jupyter-kernelspec list


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You should see this at the bottom of cell output&lt;/p&gt;

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

...
added 64 packages from 62 contributors &lt;span class="k"&gt;in &lt;/span&gt;3.604s
Available kernels:
  ir            /usr/local/share/jupyter/kernels/ir
  javascript    /usr/local/share/jupyter/kernels/javascript
  python2       /usr/local/share/jupyter/kernels/python2
  python3       /usr/local/share/jupyter/kernels/python3
  swift         /usr/local/share/jupyter/kernels/swift


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now just hit F5. And thats it! 🎉🎉🎉&lt;/p&gt;

&lt;p&gt;Your runtime will be reloaded and your Google Colab instance will now be running under ijavascript kernel (you can read more about it here &lt;a href="https://github.com/n-riesco/ijavascript" rel="noopener noreferrer"&gt;https://github.com/n-riesco/ijavascript&lt;/a&gt;). Now you can write javascript for Node.js version 8 and use power of Google Colab.&lt;/p&gt;

&lt;p&gt;If you don't see&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

  javascript    /usr/local/share/jupyter/kernels/javascript


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Check formatting of the code. For some reason Google Colab tends to add/remove spaces and this brakes everything.&lt;/p&gt;

&lt;p&gt;And if you have problems with NPM request limit "npm ERR! 429 Too Many Requests", just add Chinese NPM server to every npm install command&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

!npm install -g --unsafe-perm ijavascript --registry=https://registry.npm.taobao.org


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Known problems
&lt;/h2&gt;

&lt;p&gt;But before you go and experiment. There is two more things I need to warn you about:&lt;/p&gt;

&lt;p&gt;1) ijavascript kernel doesn't have clean and simple way to execute shell commands, so I made a helper function for you (you can find it in template)&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;spawn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;child_process&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;sh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;$$&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;sp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;spawn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;cwd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cwd&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="na"&gt;stdio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pipe&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;encoding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf-8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nx"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;()));&lt;/span&gt;
    &lt;span class="nx"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stderr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;()));&lt;/span&gt;
    &lt;span class="nx"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;close&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;$$&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;done&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;With it you can init package.json, install dependencies and run some commands.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="nf"&gt;sh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;npm init -y&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;sh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;node -v; npm -v&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;sh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;npm install @tensorflow/tfjs-node-gpu&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;2) Do not use &lt;code&gt;let, const&lt;/code&gt;. Use oldschool &lt;code&gt;var&lt;/code&gt; instead. This is really important because of Jupyter Notebook workflow suggest that you can run code in any order you want, and run multiple times. You won't be able to do that with let or const&lt;/p&gt;

&lt;p&gt;3) To run asynchronous code you should use &lt;code&gt;$$.async()&lt;/code&gt;, &lt;code&gt;$$.done()&lt;/code&gt; helpers. Otherwise you will lose cell output. To make this process easy I made another helper function&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;run_async&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;$$&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;pf&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;$$&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;done&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 can use it to run async code&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// may take a lot of time to download files for the first time&lt;/span&gt;
&lt;span class="nf"&gt;run_async&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;MnistDataset&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loadData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;  &lt;span class="c1"&gt;// async code that fetches MNINST dataset&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTrainData&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;4) After some time your instance (computer/server) will be destroyed and when you attempt to execute any javascript you will see parse error messages. To fix them just execute first cell ones more and hit F5.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why javascript
&lt;/h2&gt;

&lt;p&gt;Well there is a some of reasons why I prefer JavaScript (TensorflowJS) for Machine Learning:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Javascript is most used language in the world. According to Github and StackOverflow&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TensorflowJS is on par and some times even faster then Tensorflow (python) version &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://blog.tensorflow.org/2020/01/run-tensorflow-savedmodel-in-nodejs-directly-without-conversion.html?m=1" rel="noopener noreferrer"&gt;https://blog.tensorflow.org/2020/01/run-tensorflow-savedmodel-in-nodejs-directly-without-conversion.html?m=1&lt;/a&gt;
&lt;iframe class="tweet-embed" id="tweet-1228077414560878597-271" src="https://platform.twitter.com/embed/Tweet.html?id=1228077414560878597"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1228077414560878597-271');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1228077414560878597&amp;amp;theme=dark"
  }



&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;With JavaScript I can get clean 20-30 fps for Face detection and share it with everyone in the world without buying $$$ hardware&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/TensorFlow/status/1214290578374041600?s=20" rel="noopener noreferrer"&gt;https://twitter.com/TensorFlow/status/1214290578374041600?s=20&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;We have awesome Russian and English speaking TensroflowJS communities here in Telegram chat-app with 400 people and growing&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://t.me/tensorflow_js" rel="noopener noreferrer"&gt;https://t.me/tensorflow_js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://t.me/tensorflowjs_en" rel="noopener noreferrer"&gt;https://t.me/tensorflowjs_en&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Javascript is awesome!&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  So what's the benefit?
&lt;/h2&gt;

&lt;p&gt;Why should we suffer, use all this helpers. Why not use your MacBook? The reason is that even for small dataset like MNIST and simple CNN model you can get 3-7x performance improvements. Nice! :)&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%2Fi%2F52u4wldqtrvxe8bbk6or.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%2Fi%2F52u4wldqtrvxe8bbk6or.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And with this, finally, you can achieve Silence of the FANS...&lt;/p&gt;

&lt;p&gt;PS: On the next article I will tell you how to download and upload data to Google Colab&lt;/p&gt;

</description>
      <category>tensorflow</category>
      <category>machinelearning</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Escape plan (from JS to TS) - Simple project - PART #1</title>
      <dc:creator>Alexey Okhrimenko</dc:creator>
      <pubDate>Sun, 01 Sep 2019 11:17:54 +0000</pubDate>
      <link>https://dev.to/obenjiro/escape-plan-from-js-to-ts-simple-project-part-1-55n3</link>
      <guid>https://dev.to/obenjiro/escape-plan-from-js-to-ts-simple-project-part-1-55n3</guid>
      <description>&lt;p&gt;Here is a simple escape plan that will help you to move from old code base to modern TypeScript. This plan may not work for your project, but at least you can use it as a good starting point.&lt;/p&gt;

&lt;p&gt;1) Move &lt;code&gt;.js&lt;/code&gt; files to &lt;code&gt;src&lt;/code&gt; folder (if not already)&lt;/p&gt;

&lt;p&gt;2) For really old code base (ES3/ES5), apply Lebab (&lt;a href="https://lebab.unibtc.me/"&gt;https://lebab.unibtc.me/&lt;/a&gt;). Lebal is an awesome tool to modernize your code base ES3/ES5 =&amp;gt; ES2015/2016 automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx lebab --replace src/ --transform let,class,arrow,arrow-return,commonjs,template,obj-method,obj-shorthand ,for-of,for-each,arg-rest,arg-spread
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3) Rename extension of JS files to TS files&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for file in src/**/*.js; do mv "$file" "${file%.*}.ts"; done

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4) Create webpack config with Webpack CLI. Don't forget to choose TS when asked&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx webpack-cli init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5) Create tsconfig.json in root of your project. It's a loose config that will help you to start quickly. It will do for now.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "resolveJsonModule": true,
    "downlevelIteration": true,
    "lib": ["es2015", "dom"],
    "module": "es6",
    "target": "es5",
    "allowJs": true,
    "strict": false
  },
  "include": [
    "src/**/*"
  ],
  "exclude": [
    "node_modules"
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;6) If your code base doesn't have any import/require statements (you where using global scope and file concatenation). Add export to all top level function and classes, it will help us with the next step.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find src/ -name "*.ts" -exec sed -i '' "s/^function/export function/g;s/^class/export class/g" {} \;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;7) Use modern IDE (WebStorm, VSCode). Fix missing imports and property declarations. In any other hard to solve case use &lt;code&gt;any&lt;/code&gt;. Do not worry. We will fix that later, in next post. Repeat until &lt;code&gt;npm run build&lt;/code&gt; stops reporting errors.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uchSne9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/nz9cqpmqtp0h32wlt0nw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uchSne9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/nz9cqpmqtp0h32wlt0nw.png" alt="Alt Text" width="880" height="185"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Hyv-aE4e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/dsotzfcvarpo5qk8dxik.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Hyv-aE4e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/dsotzfcvarpo5qk8dxik.png" alt="Alt Text" width="880" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;8) PROFIT!&lt;/p&gt;

&lt;h1&gt;
  
  
  Realworld example
&lt;/h1&gt;

&lt;p&gt;I used this plan to modify a game called unicorn-runner. If you interested on how code based changed thanks to that plan:&lt;/p&gt;

&lt;p&gt;This is code before &lt;a href="https://github.com/obenjiro/unicorn-runner/tree/fccc2f57470dde0f76850522c3e7e6abe8157789"&gt;https://github.com/obenjiro/unicorn-runner/tree/fccc2f57470dde0f76850522c3e7e6abe8157789&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is after &lt;a href="https://github.com/obenjiro/unicorn-runner/tree/88157915758c4c270fa64ccd4fd2427a68bcba7a"&gt;https://github.com/obenjiro/unicorn-runner/tree/88157915758c4c270fa64ccd4fd2427a68bcba7a&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  About PART #2
&lt;/h1&gt;

&lt;p&gt;In the next part I will tell you how to add missing types automatically and make your &lt;code&gt;tsconfig.json&lt;/code&gt; little bit stricter :)&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>lebab</category>
      <category>webpack</category>
    </item>
  </channel>
</rss>
