<?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: Dani Tseiltin</title>
    <description>The latest articles on DEV Community by Dani Tseiltin (@danitseitlin).</description>
    <link>https://dev.to/danitseitlin</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%2F450344%2Feeeec98b-1b9c-4fb0-abfe-198fac20d34e.jpeg</url>
      <title>DEV Community: Dani Tseiltin</title>
      <link>https://dev.to/danitseitlin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/danitseitlin"/>
    <language>en</language>
    <item>
      <title>Monitor your Git project success!</title>
      <dc:creator>Dani Tseiltin</dc:creator>
      <pubDate>Mon, 08 Feb 2021 20:19:46 +0000</pubDate>
      <link>https://dev.to/danitseitlin/monitor-your-git-project-success-3n9b</link>
      <guid>https://dev.to/danitseitlin/monitor-your-git-project-success-3n9b</guid>
      <description>&lt;p&gt;Hi fells!&lt;br&gt;
Lately, I've been working hard on a lot of personal projects to boost my appearances in GitHub and the software development world (and mostly, reach success in my projects over GitHub), so I was drastically developing projects day and night to get stuff done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Issues
&lt;/h2&gt;

&lt;p&gt;My main issues we're, that because I have a lot of projects I work on (while most of them are also NPM packages) it was hard for me to follow on all of them regarding downloads/stars/forks and such.&lt;br&gt;
My solution was to develop the Android app I called &lt;a href="https://play.google.com/store/apps/details?id=com.gitstats"&gt;'Git Stats'&lt;/a&gt; that solved my issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key features
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Ability to find GitHub projects&lt;/li&gt;
&lt;li&gt;Ability to open GitHub projects information (stars, forks, npm statistics)&lt;/li&gt;
&lt;li&gt;Ability to save projects in bookmarks for easier &amp;amp; quicker access.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>reactnative</category>
      <category>android</category>
      <category>github</category>
      <category>npm</category>
    </item>
    <item>
      <title>See your project stats! </title>
      <dc:creator>Dani Tseiltin</dc:creator>
      <pubDate>Sat, 06 Feb 2021 12:55:56 +0000</pubDate>
      <link>https://dev.to/danitseitlin/follow-up-on-your-project-statistics-anywhere-you-go-4ndh</link>
      <guid>https://dev.to/danitseitlin/follow-up-on-your-project-statistics-anywhere-you-go-4ndh</guid>
      <description>&lt;p&gt;Hi fells!&lt;br&gt;
Lately, I've been working hard on a lot of personal projects to boost my appearances in GitHub and the software development world (and mostly, reach success in my projects over GitHub), so I was drastically developing projects day and night to get stuff done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Main issue
&lt;/h2&gt;

&lt;p&gt;Because I have a lot of projects I work on (while most of them are also NPM packages) it was hard for me to follow on all of them regarding downloads/stars/forks and such.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I solved it
&lt;/h2&gt;

&lt;p&gt;I developed an Android app called &lt;a href="https://play.google.com/store/apps/details?id=com.gitstats"&gt;Git Stats&lt;/a&gt;, this gave me the ability to make it easier and quicker to access my projects information!&lt;/p&gt;

&lt;h2&gt;
  
  
  Key features
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Ability to find GitHub projects&lt;/li&gt;
&lt;li&gt;Ability to open GitHub projects information (stars, forks, npm statistics)&lt;/li&gt;
&lt;li&gt;Ability to save projects in bookmarks for easier &amp;amp; quicker access.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I'd be happy to hear your thoughts on the app! please be there to share if you like it! feel free to give it some ⭐ if you think I did a good job! I hope I helped you as well~&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>android</category>
      <category>git</category>
      <category>npm</category>
    </item>
    <item>
      <title>Do you use Redis? </title>
      <dc:creator>Dani Tseiltin</dc:creator>
      <pubDate>Sat, 09 Jan 2021 02:12:46 +0000</pubDate>
      <link>https://dev.to/danitseitlin/do-you-use-redis-5dg2</link>
      <guid>https://dev.to/danitseitlin/do-you-use-redis-5dg2</guid>
      <description>&lt;p&gt;Do you use Redis? Or even better = Redis Modules?&lt;br&gt;
I've built a nice project in typescript as a living and easy SDK for Redis Modules!!&lt;br&gt;
Please join and say your piece :) &lt;a href="https://github.com/danitseitlin/redis-modules-sdk"&gt;https://github.com/danitseitlin/redis-modules-sdk&lt;/a&gt;&lt;/p&gt;

</description>
      <category>redis</category>
      <category>database</category>
      <category>typescript</category>
      <category>javascript</category>
    </item>
    <item>
      <title>[#ActionsHackathon] Automatic NPM deployments</title>
      <dc:creator>Dani Tseiltin</dc:creator>
      <pubDate>Sun, 16 Aug 2020 00:07:00 +0000</pubDate>
      <link>https://dev.to/danitseitlin/actionshackathon-automatic-npm-deployments-57a0</link>
      <guid>https://dev.to/danitseitlin/actionshackathon-automatic-npm-deployments-57a0</guid>
      <description>&lt;p&gt;As part of my #ActionsHackathon submission, I'll be sharing a workflow that will be automatically deploying versions of your NPM package using a project I developed called &lt;a href="https://github.com/danitseitlin/npm-package-deployer"&gt;npm-package-deploy&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In a few words:&lt;br&gt;
This project was originally developed because I had a project where I wanted to automate the NPM version releases on each commit to master in order to make it a bit easier and quicker.&lt;/p&gt;

&lt;p&gt;Prerequisites (Before usage):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install the &lt;code&gt;npm-package-deployer&lt;/code&gt; package.&lt;/li&gt;
&lt;li&gt;Add a lint script to your package.json (&lt;code&gt;"lint": "eslint ."&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Add a deploy script to your package.json (&lt;code&gt;"deploy": "npm-deploy [name of your package]"&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Add a script for your tests (which I called &lt;code&gt;unit-tests&lt;/code&gt; in my example)&lt;/li&gt;
&lt;li&gt;Define a secret called &lt;code&gt;NPM_AUTH_TOKEN&lt;/code&gt; which holds the value of your NPM authentication token.&lt;/li&gt;
&lt;li&gt;Define secrets for &lt;code&gt;BOT_NAME&lt;/code&gt; and &lt;code&gt;BOT_EMAIL&lt;/code&gt; that will hold any fake values. (Used to define GIT name and GIT email for the deployment)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  My Workflow (Named -&amp;gt; Deployment BOT)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#This is an automatic deployer flow

name: Deployment Bot
on:
  push:
    branches: [ master ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Configurating GIT
      run: git config --global user.name $BOT_NAME &amp;amp;&amp;amp; git config --global user.email $BOT_EMAIL
      env:
        BOT_NAME: ${{secrets.BOT_NAME}}
        BOT_EMAIL: ${{secrets.BOT_EMAIL}}
    - name: Creating .npmrc file
      run: echo "registry=https://registry.npmjs.org/" &amp;gt;&amp;gt; ~/.npmrc &amp;amp;&amp;amp; echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" &amp;gt;&amp;gt; ~/.npmrc
      env:
        NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH}}
    - name: Installing NPM packages
      run: npm install
    - name: Running tests
      run: npm run unit-tests
    - name: Verifying linting
      run: npm run lint
    - name: Deploying version
      run: npm run build &amp;amp;&amp;amp; npm run deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Submission Category:
&lt;/h3&gt;

&lt;p&gt;Maintainer Must-Haves&lt;/p&gt;

&lt;h3&gt;
  
  
  Yaml File or Link to Code:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/danitseitlin/dmock-server/blob/master/.github/workflows/auto-deployer.yml"&gt;Yaml File&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources / Info
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/danitseitlin/dmock-server"&gt;Link to the using repository&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/danitseitlin/dmock-server/runs/989233130?check_suite_focus=true"&gt;Link to a GitHub Action Execution&lt;/a&gt;&lt;/p&gt;

</description>
      <category>actionshackathon</category>
      <category>javascript</category>
      <category>typescript</category>
      <category>npm</category>
    </item>
    <item>
      <title>How to better manage your CLI arguments</title>
      <dc:creator>Dani Tseiltin</dc:creator>
      <pubDate>Sat, 15 Aug 2020 09:08:51 +0000</pubDate>
      <link>https://dev.to/danitseitlin/manage-your-cli-arguments-easier-4g2b</link>
      <guid>https://dev.to/danitseitlin/manage-your-cli-arguments-easier-4g2b</guid>
      <description>&lt;p&gt;Today, in the natural way in nodejs, our CLI arguments are passed into something called &lt;code&gt;process.argv&lt;/code&gt; as a string array.&lt;br&gt;
The problem with that, is that it's not really 'extremely easy  to use' in your code.&lt;br&gt;
You'd have to do something like the following code (each time):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const arg = process.argv.find((argument: string) =&amp;gt; argument.indexOf('--arg=') !== -1);
const value = arg.split('=')[1];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code above looks for an item in the array that will contain part of your argument, for this example your argument is &lt;code&gt;--arg&lt;/code&gt;.&lt;br&gt;
Not only that, afterwards you need to only take the value in order to use it.&lt;br&gt;
Maybe the code is not complex, but for me it was quite annoying to always handle in my personal/work projects.&lt;/p&gt;
&lt;h2&gt;
  
  
  A Better solution:
&lt;/h2&gt;

&lt;p&gt;In order to solve my issue, I brought to life a NPM package called &lt;code&gt;cli-argument-parser&lt;/code&gt;, this package gives you to ability to address a JS object that will contain only the relevant arguments and their values.&lt;/p&gt;
&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;p&gt;After running &lt;code&gt;npm install cli-argument-parser&lt;/code&gt; to install it,&lt;br&gt;
You can try the following code snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { cliArguments } from 'cli-argument-parser';
const arg1 = cliArguments.arg1;
const arg2 = cliArguments.arg2;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The package, works based on arguments prefixes (&lt;code&gt;--&lt;/code&gt; as default) and separators (&lt;code&gt;=&lt;/code&gt; as default).&lt;br&gt;
According to the code snippet above, if I pass the arguments &lt;code&gt;--arg1=value1 arg2=value2&lt;/code&gt;, the variable arg1 will hold the correct value, but variable arg2 will hold the value of undefined, because it was filtered out based on the default prefix of &lt;code&gt;--&lt;/code&gt;,&lt;br&gt;
If we passed &lt;code&gt;--arg2=value2&lt;/code&gt;, the arg2 variable will hold the correct value of value2.&lt;/p&gt;
&lt;h2&gt;
  
  
  Command line configuration:
&lt;/h2&gt;

&lt;p&gt;Even though I honestly favor using arguments this way &lt;code&gt;--arg=value&lt;/code&gt;, people are different so I made sure we can configure unique styles of argument filtering.&lt;/p&gt;
&lt;h3&gt;
  
  
  Using a configuration file
&lt;/h3&gt;

&lt;p&gt;A way to achieve this is to create a file called &lt;code&gt;cli.config.json&lt;/code&gt; in the root directory of your project. You will need to set both prefix and separator like the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    prefix: '-',
    separator: '~'
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration means, that you can now pass argument of &lt;code&gt;-arg~value&lt;/code&gt; and it will know to filter the correct arguments and build it in the &lt;code&gt;cliArguments&lt;/code&gt; JS object.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using CLI arguments
&lt;/h3&gt;

&lt;p&gt;If additional files are a mess in your opinion, it is also possible to pass the CLI configuration via CLI arguments.&lt;br&gt;
&lt;code&gt;--cli-prefix&lt;/code&gt; to configurate the CLI prefix, ie: &lt;code&gt;--cli-prefix=--&lt;/code&gt;&lt;br&gt;
&lt;code&gt;--cli-separator&lt;/code&gt; to configurate the CLI separator, ie: &lt;code&gt;--cli-separator==&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Using the code
&lt;/h3&gt;

&lt;p&gt;Instead of using the existing &lt;code&gt;cliArguments&lt;/code&gt;, you are able to also create a custom one, using the following code snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { filterArguments } from 'cli-argument-parser';
const arguments = filterArguments('--', '=');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;arguments&lt;/code&gt; variable will hold a JS object with arguments (just like &lt;code&gt;cliArguments&lt;/code&gt;) filtered by defined prefix and separator.&lt;/p&gt;

&lt;h2&gt;
  
  
  In a few words:
&lt;/h2&gt;

&lt;p&gt;Maybe the problem is not the biggest, but definitely makes it a bit easier to read CLI arguments using this package.&lt;br&gt;
Feel free to share your thoughts and take a peek &lt;a href="https://github.com/danitseitlin/cli-argument-parser"&gt;here&lt;/a&gt; and don't be shy to ⭐ it ;)&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>npm</category>
      <category>node</category>
    </item>
    <item>
      <title>NPM Deploy Bot: Automate your deploy process</title>
      <dc:creator>Dani Tseiltin</dc:creator>
      <pubDate>Mon, 10 Aug 2020 19:52:53 +0000</pubDate>
      <link>https://dev.to/danitseitlin/simple-deploybot-npm-package-494f</link>
      <guid>https://dev.to/danitseitlin/simple-deploybot-npm-package-494f</guid>
      <description>&lt;p&gt;Hi, I've made a NPM package that helps you release versions of your NPM package.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;I had a project where I wanted to automate the NPM version releases on each commit to master in order to automate the process and make it a bit easier.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you use it?
&lt;/h2&gt;

&lt;p&gt;You just run &lt;code&gt;npm-deploy &amp;lt;package name&amp;gt;&lt;/code&gt; and it releases the next version based on the latest version released to NPM.&lt;br&gt;
You can also create a package.json script to deploy your version to make it easier to use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
  "deploy": "npm-deploy &amp;lt;package name&amp;gt;"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  GitHub Actions integration
&lt;/h2&gt;

&lt;p&gt;You can integrate this package with a GitHub action workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Setup your git configuration&lt;/li&gt;
&lt;li&gt;Create an .npmrc file with the NPM auth token&lt;/li&gt;
&lt;li&gt;Add deploy script in your package.json like in the example above&lt;/li&gt;
&lt;li&gt;Run npm run deploy
A full example can be seen &lt;a href="https://github.com/danitseitlin/dmock-server/blob/master/.github/workflows/auto-deployer.yml"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you liked it, you can find this package &lt;a href="https://github.com/danitseitlin/npm-package-deployer#npm-deploy-bot--automate-your-deployment-process"&gt;here&lt;/a&gt;, feel free to point out your &lt;strong&gt;opinion&lt;/strong&gt; and give it a good star ;)&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>npm</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
