<?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: Nitzan Hen</title>
    <description>The latest articles on DEV Community by Nitzan Hen (@nitzanhen).</description>
    <link>https://dev.to/nitzanhen</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%2F683842%2F6fa9233d-ee32-4a29-b83d-c298352ff3fd.jpeg</url>
      <title>DEV Community: Nitzan Hen</title>
      <link>https://dev.to/nitzanhen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nitzanhen"/>
    <language>en</language>
    <item>
      <title>Help me get familiar with Tailwind CSS</title>
      <dc:creator>Nitzan Hen</dc:creator>
      <pubDate>Wed, 29 Jun 2022 12:11:19 +0000</pubDate>
      <link>https://dev.to/nitzanhen/help-me-get-familiar-with-tailwind-css-d1g</link>
      <guid>https://dev.to/nitzanhen/help-me-get-familiar-with-tailwind-css-d1g</guid>
      <description>&lt;p&gt;Hello!&lt;/p&gt;

&lt;p&gt;Are you an expert on &lt;a href="https://tailwindcss.com/"&gt;Tailwind CSS&lt;/a&gt;? a more casual user or beginner? or simply curious about it like me?&lt;br&gt;
In any case, I'd like your help!&lt;/p&gt;

&lt;p&gt;I'm working on a huge new version for &lt;a href="https://github.com/NitzanHen/agrippa"&gt;Agrippa&lt;/a&gt;, which is essentially an open source tool for generating frontend components without the boilerplate (kind of like supercharged snippets, but even greater 🤩). &lt;br&gt;
Seeing as Tailwind is already used in many teams today and it's only becoming more and more popular, I thought it could be beneficial to many if Agrippa had first-class support for it - and it's a great opportunity to learn more about a trending tool, too 😄&lt;/p&gt;

&lt;p&gt;My immediate question is, therefore, more about the &lt;em&gt;practical patterns&lt;/em&gt; of tailwind than the idea of it, and most particularly - &lt;strong&gt;in a project that uses Tailwind CSS, what does your typical component look like&lt;/strong&gt;? what are your "must-haves" for such a component? is there any boilerplate that could be automatically generated for you, saving you time?&lt;/p&gt;

&lt;p&gt;Of course, it wouldn't be interesting to limit the discussion just to that, so let's talk about Tailwind in general:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What sold you on Tailwind? &lt;/li&gt;
&lt;li&gt;Which of Tailwind's features do you use most and which do you not use?&lt;/li&gt;
&lt;li&gt;Do you have any tips to share about using it?&lt;/li&gt;
&lt;li&gt;Do you struggle with any of its aspects?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Personally, I always thought Tailwind's alternative method to writing CSS is problematic, and would cause problems down the line in terms of clarity, scalability and maintainability. However, seeing enough talented people in large teams praise it convinced me to reconsider!&lt;/p&gt;

&lt;p&gt;I'm really hoping to hear everyone's experiences and bits of wisdom about Tailwind!&lt;/p&gt;

&lt;p&gt;If you prefer talking on Twitter, let's &lt;a href="https://twitter.com/NitzanHen/status/1542119288118599680?t=M7rPJUcH24GDCrldpbG_wQ&amp;amp;s=19"&gt;discuss it there&lt;/a&gt;!&lt;br&gt;
Or, if you'd like to contribute to Agrippa's effort to support Tailwind directly, we'd love to hear your voice on &lt;a href="https://github.com/NitzanHen/agrippa/issues/70"&gt;our GitHub issue&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Thank you and have a great day!&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>javascript</category>
      <category>tailwindcss</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Agrippa 1.4 is out 🎉🎊</title>
      <dc:creator>Nitzan Hen</dc:creator>
      <pubDate>Wed, 09 Feb 2022 20:15:23 +0000</pubDate>
      <link>https://dev.to/nitzanhen/agrippa-14-is-out-23co</link>
      <guid>https://dev.to/nitzanhen/agrippa-14-is-out-23co</guid>
      <description>&lt;p&gt;The fourth minor version of Agrippa, the React component CLI, is finally out!&lt;/p&gt;

&lt;p&gt;Once again, Agrippa's community has grown a lot since the release of the previous minor update, v1.3.0, &lt;a href="https://dev.to/nitzanhen/agrippa-13-is-out-4g0n"&gt;back in December&lt;/a&gt;. &lt;strong&gt;Agrippa has grown by over 230 stars since the previous release&lt;/strong&gt; - in absolute terms, that's our biggest growth yet!&lt;/p&gt;

&lt;p&gt;Releasing a new version is always a good opportunity to &lt;em&gt;express my deep gratitude to everyone using Agrippa&lt;/em&gt;, and especially those of you who've given your feedback, suggested features, or opened other issues on our GitHub repository. You're the best!&lt;/p&gt;

&lt;p&gt;If you're not using Agrippa, join us! Read the &lt;a href="https://dev.to/nitzanhen/getting-started-with-agrippa-the-react-cli-24i8"&gt;Getting Started&lt;/a&gt; guide or &lt;a href="https://github.com/NitzanHen/agrippa" rel="noopener noreferrer"&gt;visit us on GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  v1.4.0
&lt;/h2&gt;

&lt;p&gt;We have some exciting new features released in v1.4.0:&lt;/p&gt;

&lt;h3&gt;
  
  
  New terminal UI 🎨
&lt;/h3&gt;

&lt;p&gt;Agrippa's terminal UI has been revamped! it should now be more informative, a lot cleaner, and especially much more ✨&lt;em&gt;aesthetic&lt;/em&gt;✨.&lt;/p&gt;

&lt;p&gt;As an example:&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%2Fuploads%2Farticles%2F20xwatxk14tah0i1jnat.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F20xwatxk14tah0i1jnat.png" alt="New Agrippa output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Styled-components 💅
&lt;/h3&gt;

&lt;p&gt;Agrippa now supports styling with &lt;code&gt;styled-components&lt;/code&gt;! This is actually the &lt;a href="https://github.com/NitzanHen/agrippa/issues/2" rel="noopener noreferrer"&gt;second issue&lt;/a&gt; opened for Agrippa, and it's been open for quite a while now. It's truly nice to see it finally implemented. To check it out, use the value &lt;code&gt;styled-components&lt;/code&gt; for the &lt;code&gt;styling&lt;/code&gt; flag.&lt;/p&gt;

&lt;h3&gt;
  
  
  tsPropsDeclaration
&lt;/h3&gt;

&lt;p&gt;TS users can now select between &lt;code&gt;interface&lt;/code&gt;s and &lt;code&gt;type&lt;/code&gt;s for component props declarations.&lt;br&gt;
For more info, see &lt;a href="https://github.com/NitzanHen/agrippa/wiki/The-complete-list-of-generation-options" rel="noopener noreferrer"&gt;the docs on &lt;code&gt;tsPropsDeclaration&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  New post-command variables
&lt;/h3&gt;

&lt;p&gt;Two new variables, &lt;code&gt;&amp;lt;ComponentName&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;component-name&amp;gt;&lt;/code&gt;, can now be used with post commands.&lt;br&gt;
The first is the generated component's name in pascal case (e.g. &lt;code&gt;NiceButton&lt;/code&gt;), while the second is in kebab case (e.g. &lt;code&gt;nice-button&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Dependency cleanup
&lt;/h3&gt;

&lt;p&gt;Two packages that Agrippa has been using up to now, but hasn't really needed to, were removed, and Agrippa should now be a little lighter.&lt;/p&gt;


&lt;br&gt;

&lt;p&gt;That's pretty much it! We've already begun to work on the next features for Agrippa. Our main focus in the near future is on implementing test file generation, further expanding Agrippa's flexibility to suite custom use-cases, and more. &lt;br&gt;
That being said, we're always on the lookout ideas for new features and improvements, so if you have one - please share it with us!&lt;/p&gt;

&lt;p&gt;To get started with Agrippa, read the &lt;a href="https://dev.to/nitzanhen/getting-started-with-agrippa-the-react-cli-24i8"&gt;Getting Started&lt;/a&gt; guide or &lt;a href="https://github.com/NitzanHen/agrippa" rel="noopener noreferrer"&gt;visit us on GitHub&lt;/a&gt;.&lt;br&gt;
&lt;em&gt;Your thoughts and feedback, as always, are most welcome&lt;/em&gt;.&lt;br&gt;
If you've found a bug with this release, or want to suggest a new feature, please &lt;a href="https://github.com/NitzanHen/agrippa/issues" rel="noopener noreferrer"&gt;submit an issue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>news</category>
    </item>
    <item>
      <title>Getting started with Agrippa, the React CLI</title>
      <dc:creator>Nitzan Hen</dc:creator>
      <pubDate>Sun, 30 Jan 2022 11:06:36 +0000</pubDate>
      <link>https://dev.to/nitzanhen/getting-started-with-agrippa-the-react-cli-24i8</link>
      <guid>https://dev.to/nitzanhen/getting-started-with-agrippa-the-react-cli-24i8</guid>
      <description>&lt;p&gt;&lt;strong&gt;TLDR&lt;/strong&gt;: Agrippa is a CLI for generating React components with ease. By typing three words into the command line in your project, you can generate a whole new component - including a dedicated directory, styling files, an index file, etc. It takes &lt;em&gt;a few seconds&lt;/em&gt; to set up in any React project, a couple of minutes to learn, and saves you time and effort from the get-go.&lt;/p&gt;

&lt;p&gt;To get started, visit &lt;a href="https://github.com/NitzanHen/agrippa" rel="noopener noreferrer"&gt;Agrippa&lt;/a&gt; on GitHub. If you'd like to know some more, stick around:&lt;/p&gt;

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

&lt;p&gt;You might be wondering, what are Agrippa's advantages over writing components by hand, copying &amp;amp; pasting from template files, or using a snippet tool (in VSCode, for example)? The short answer is that &lt;strong&gt;using Agrippa is much more efficient&lt;/strong&gt;, and the generated result is &lt;strong&gt;both more flexible and more complete&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let's walk through it: in terms of time it takes to set up a component, typing a short command into your favorite terminal is orders of magnitude faster than writing components by hand or manually copying &amp;amp; pasting from template files (e.g. on your PC). As for snippets, the time to create a basic component using a snippet may not be &lt;em&gt;much&lt;/em&gt; higher than typing a short command, but when you factor in creating a directory, index file, and styling file for the component alongside the React code itself - having a command doing it all for you is quicker and more convenient.&lt;/p&gt;

&lt;p&gt;But there's a second, more important advantage for Agrippa over snippets - &lt;em&gt;flexibility&lt;/em&gt;. This is actually my main motivation for creating Agrippa! If you or your team have a favorite stack which is used in all of the projects you work on - a few snippets might do the job well enough for you. But, React has a diverse ecosystem, and you might easily find yourself working in many different environments with different tools.&lt;br&gt;
As a concrete example, let's say in your dev life you come across both JS and TS projects, four different styling solutions (e.g. SCSS, CSS, JSS, styled-components), two different export types (named &amp;amp; default), and two different component declaration schemes (&lt;code&gt;const&lt;/code&gt; &amp;amp; &lt;code&gt;function&lt;/code&gt;). Any combination of those is valid, &lt;strong&gt;so to account for all of them you'd need 4*2*2*2 = 32 snippets&lt;/strong&gt;. And that's before taking into consideration React Native projects, different prop declarations (JSDoc, prop-types), etc. You end up working more on your snippets than your project!&lt;/p&gt;

&lt;p&gt;And sure, you could get around with a smaller amount of snippets by making them more generic. But, then they &lt;em&gt;lose their flexibility&lt;/em&gt;, and you find yourself "fixing" every component generated with a snippet, so that it actually fits into the projects' stack. &lt;/p&gt;

&lt;p&gt;Again, compare that to writing a 3-4 word command into the command line, and getting a much better result. A compelling option, right?&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up Agrippa
&lt;/h2&gt;

&lt;p&gt;Getting started with Agrippa is dead simple, regardless of project size. The minimal requirements to using it is simply installing it, using &lt;code&gt;npm i -g agrippa&lt;/code&gt;. &lt;br&gt;
When run in a project, using &lt;code&gt;agrippa gen &amp;lt;component-name&amp;gt;&lt;/code&gt;, Agrippa automatically determines most of the options it needs to run effectively - this includes whether the project is using Typescript, whether it's a React Native project, etc. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Typical output for &lt;code&gt;agrippa gen&lt;/code&gt; (v1.4.0+):&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%2Fuploads%2Farticles%2Fpzofhkuhfe3uirpf3gvp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpzofhkuhfe3uirpf3gvp.png" alt="Typical Agrippa output"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;br&gt;
&lt;h3&gt;
  
  
  Using a config
&lt;/h3&gt;

&lt;p&gt;Options that aren't detected automatically (e.g. which styling solution code to generate) can be passed through the command line. However, to avoid having to type the same options over and over, using a config is recommended. A config is a plain old JSON file, named &lt;code&gt;.agripparc.json&lt;/code&gt;, which typically sits at the root of your project. It can be generated by calling &lt;code&gt;agrippa init&lt;/code&gt;. Then, you can add your options, and Agrippa will read them whenever it is run!&lt;/p&gt;

&lt;p&gt;In most projects, you'd add two-three options to the config - the &lt;code&gt;styling&lt;/code&gt; solution you use, a &lt;code&gt;baseDir&lt;/code&gt; in which your components are usually generated, and, occasionally, a &lt;code&gt;postCommand&lt;/code&gt;, which is a command that's run after Agrippa successfully generates a components. &lt;/p&gt;

&lt;p&gt;A typical &lt;code&gt;.agripparc.json&lt;/code&gt; config file looks something along the lines of:&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%2Fuploads%2Farticles%2F298mcxeqn4bpcuspemm0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F298mcxeqn4bpcuspemm0.png" alt="typical Agrippa config"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the complete list of options that Agrippa supports, see &lt;a href="https://github.com/NitzanHen/agrippa/wiki/The-complete-list-of-generation-options" rel="noopener noreferrer"&gt;The Complete List of Generation Options&lt;/a&gt; on the &lt;a href="https://github.com/NitzanHen/agrippa/wiki" rel="noopener noreferrer"&gt;wiki&lt;/a&gt;. For more info about &lt;code&gt;baseDir&lt;/code&gt;, see &lt;a href="https://github.com/NitzanHen/agrippa/wiki/Using-baseDir-and-dest" rel="noopener noreferrer"&gt;Using baseDir and dest&lt;/a&gt;. Finally, for more info about post-commands, which are one of the main features that make Agrippa as flexible as it is, see &lt;a href="https://github.com/NitzanHen/agrippa/wiki/Post-Command-cookbook-%F0%9F%8D%B2" rel="noopener noreferrer"&gt;The Post Command cookbook 🍲&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final notes
&lt;/h2&gt;

&lt;p&gt;That's it! Agrippa has an ever-growing community around it, and I hope you'll join it too! To get started, visit &lt;a href="https://github.com/NitzanHen/agrippa" rel="noopener noreferrer"&gt;Agrippa&lt;/a&gt; on GitHub.&lt;/p&gt;

&lt;p&gt;I'd love to hear your thoughts and feedback on Agrippa (or on this post in particular). Thanks for your time, have a great day!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>react</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Why we used Docker for testing </title>
      <dc:creator>Nitzan Hen</dc:creator>
      <pubDate>Wed, 29 Dec 2021 21:11:09 +0000</pubDate>
      <link>https://dev.to/nitzanhen/why-we-used-docker-for-testing-p1d</link>
      <guid>https://dev.to/nitzanhen/why-we-used-docker-for-testing-p1d</guid>
      <description>&lt;p&gt;Perhaps the greatest lesson I've learned from creating &lt;a href="https://github.com/NitzanHen/agrippa" rel="noopener noreferrer"&gt;Agrippa&lt;/a&gt; so far is just how important tests are. Of course I knew they were important before - everybody does - but it's so easy to just push it aside and focus on more exciting code, or write some perfunctory tests that don't really, well, test anything. Eventually, however, slacking off on testing comes back to bite you; for me, luckily, it did when things were only getting started, but the point was clear - writing good tests is a top priority.&lt;/p&gt;

&lt;h2&gt;
  
  
  A challenging tool to test
&lt;/h2&gt;

&lt;p&gt;For Agrippa, however, writing good tests is far from trivial - it's a CLI for generating React components based on a project's environment (dependencies, existence of config files, etc.), as well as an optional &lt;code&gt;.agripparc.json&lt;/code&gt; config. In other words, a lot of its work is reading &amp;amp; parsing command-line arguments, looking up and reading certain files, and its end result is writing additional files. All of those are non-pure side effects, which are difficult to cover properly with just unit tests. &lt;/p&gt;

&lt;p&gt;Additionally, because Agrippa's defaults greatly depend on the project's environment, it's easy for tests to return false results because of the presence of an unrelated file or dependency. &lt;br&gt;
This is best explained with an example: when run, Agrippa auto-detects whether a project uses Typescript or not, by the existence of a &lt;code&gt;tsconfig.json&lt;/code&gt; file in it. However, Agrippa itself is written in Typescript, which means there's a &lt;code&gt;tsconfig.json&lt;/code&gt; file at its root. As a result, whenever running Agrippa in any sub directory of the project root, &lt;em&gt;it generates Typescript (&lt;code&gt;.ts&lt;/code&gt;/&lt;code&gt;.tsx&lt;/code&gt;) files unless explicitly told otherwise.&lt;/em&gt; And, if tests were stored, for example, in a &lt;code&gt;test&lt;/code&gt; folder in the project repository - they would all be tampered with (at least, those where files are looked up). A similar problem is cause by the existence Agrippa's own &lt;code&gt;package.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;With this in mind, when planning the implementation of testing I decided on these two key principles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;There need to be good &lt;em&gt;integration&lt;/em&gt; tests which test the process - including all of its non pure effects (parsing CLI options, reading files, writing files) - from start to finish, under different conditions and in different environments.&lt;/li&gt;
&lt;li&gt;The integration tests have to be executed in a space as &lt;em&gt;isolated&lt;/em&gt; as possible, due to the process being greatly dependent on the environment it's run in.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The second point is where you can see the need for &lt;em&gt;Docker&lt;/em&gt; - initially, I tried implementing the tests in a temporary directory created by Node and running the tests there, but this turned out to be too much work to build and maintain, and the created directory could still theoretically be non-pure. &lt;br&gt;
Docker, on the other hand, is all about spinning up isolated environments with ease - we have complete control over the OS, the file structure, the present files, and we're more explicit about it all. &lt;/p&gt;

&lt;p&gt;In our case, then, &lt;strong&gt;running the tests inside a docker container would get us the isolation we need&lt;/strong&gt;. So that's what we went with:&lt;/p&gt;

&lt;h2&gt;
  
  
  The solution
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Solution file structure (simplified)&lt;/span&gt;
&lt;span class="nb"&gt;test&lt;/span&gt;/integration/
├─ case1/
│  ├─ solution/
│  │  ├─ ComponentOne.tsx
│  │  ├─ component-one.css
│  ├─ testinfo.json
├─ case2/
│  ├─ solution/
│  │  ├─ ComponentTwo.tsx
│  │  ├─ component-two.css
│  ├─ testinfo.json
├─ case3/
│  ├─ ...
├─ integration.test.ts
├─ jest.integration.config.js
Dockerfile.integration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The end solution works like so:&lt;br&gt;
Integration test cases are stored under &lt;a href="https://github.com/NitzanHen/agrippa/tree/main/test/integration" rel="noopener noreferrer"&gt;&lt;code&gt;test/integration&lt;/code&gt;&lt;/a&gt;, in the &lt;a href="https://github.com/NitzanHen/agrippa" rel="noopener noreferrer"&gt;Agrippa repository&lt;/a&gt;. Each case contains a &lt;code&gt;testinfo.json&lt;/code&gt; file, which declares some general info about the test - a &lt;code&gt;name&lt;/code&gt;, a &lt;code&gt;description&lt;/code&gt; and the &lt;code&gt;command&lt;/code&gt; to be run - and a directory &lt;code&gt;solution&lt;/code&gt;, with the directories and files that are meant to be created by the command. The &lt;code&gt;test/integration&lt;/code&gt; directory also contains a Jest config, and &lt;a href="https://github.com/NitzanHen/agrippa/blob/main/test/integration/integration.test.ts" rel="noopener noreferrer"&gt;&lt;code&gt;integration.test.ts&lt;/code&gt;&lt;/a&gt;, which contains the test logic itself.&lt;/p&gt;

&lt;p&gt;When the &lt;code&gt;test:integration&lt;/code&gt; Node script is run, it builds a Docker image from &lt;a href="https://github.com/NitzanHen/agrippa/blob/main/Dockerfile.integration" rel="noopener noreferrer"&gt;&lt;code&gt;Dockerfile.integration&lt;/code&gt;&lt;/a&gt;, located at the project root. This is a two-stage build: the first stage copies the project source, builds it and packs it into a tarball, and the second copies &amp;amp; installs that tarball, then copies the &lt;code&gt;test/integration&lt;/code&gt; directory. After building the image, a container is created from it, which runs the tests inside.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/NitzanHen/agrippa/blob/main/test/integration/integration.test.ts" rel="noopener noreferrer"&gt;testing logic&lt;/a&gt; is non-trivial, too. It scans the &lt;code&gt;test/integration&lt;/code&gt; directory for cases, and creates a test suite for each (using &lt;code&gt;describe.each()&lt;/code&gt;). The test suite for each case starts by running the case - scanning the &lt;code&gt;solution&lt;/code&gt; directory, running the &lt;code&gt;agrippa&lt;/code&gt; command, then scanning the output directory - then compares the two results. A case is considered successful if (and only if) both &lt;code&gt;solution&lt;/code&gt; and &lt;code&gt;output&lt;/code&gt; have exactly the same directories, the same files, and the content in each file is the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  Further improvements
&lt;/h2&gt;

&lt;p&gt;So far, the solution has been working well. The script takes longer to run than a standard testing script, because of the time it takes for Docker to set up (about 60-70 seconds if Docker needs to build the image, a few seconds otherwise). However, it's simpler, more robust, and safer than implementing a custom solution (with temporary directories, for example), and adding new test cases is easy and boilerplate-free. &lt;/p&gt;

&lt;p&gt;The output (shortened for display purposes) looks like this:&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%2Fuploads%2Farticles%2Frpe3u42rt7b4tnad42gl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frpe3u42rt7b4tnad42gl.png" alt="output, shortened"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One problem with the implementation, unrelated to Docker, is about using Jest as the testing framework. As it turns out, Jest is limited when it comes to asynchronous testing, and combining a dynamic number of test suites (one for each case), a dynamic number of tests in each, as well as asynchronous setup before all tests (scanning &lt;code&gt;test/integration&lt;/code&gt; for cases) and before each test (running the case) simply doesn't work out.&lt;/p&gt;

&lt;p&gt;When I get to it, I hope to switch to a different testing framework - &lt;a href="https://mochajs.org/" rel="noopener noreferrer"&gt;Mocha&lt;/a&gt; looks good for this particular scenario, and seems fun to get into.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Since Agrippa is greatly sensitive to the environment it's run in, &lt;br&gt;
we needed complete isolation of our testing environment for the tests to truly be accurate. Docker provides exactly that - and therefore we turned to it. The solution using it took some time to properly implement - but it turned out well.&lt;/p&gt;

&lt;p&gt;What do you think? do you have an improvement to suggest, or something to add? I'd love to hear from you!&lt;br&gt;
Thanks for your time.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>docker</category>
      <category>testing</category>
    </item>
    <item>
      <title>Agrippa 1.3 is out 🎉🎉🎉</title>
      <dc:creator>Nitzan Hen</dc:creator>
      <pubDate>Sat, 04 Dec 2021 21:46:55 +0000</pubDate>
      <link>https://dev.to/nitzanhen/agrippa-13-is-out-4g0n</link>
      <guid>https://dev.to/nitzanhen/agrippa-13-is-out-4g0n</guid>
      <description>&lt;p&gt;The third minor version of Agrippa, the React component CLI, is finally out!&lt;/p&gt;

&lt;p&gt;Since v1.2.0 came out, Agrippa has seen tremendous growth - counting the difference in stars on &lt;a href="https://github.com/NitzanHen/agrippa"&gt;the GitHub repo&lt;/a&gt;, for example, &lt;strong&gt;we've grown by 120% (154 stars) over the course of just over 40 days!&lt;/strong&gt; &lt;br&gt;
More issues are also being opened (and closed!) on GitHub, too.&lt;/p&gt;

&lt;p&gt;This is a good opportunity to say that &lt;em&gt;I'm truly grateful for everyone who have tried Agrippa out and joined the community&lt;/em&gt;; I'm delighted to see Agrippa growing and being used, and I'm super excited for it to grow and improve further in the future.&lt;/p&gt;

&lt;p&gt;So, thanks everyone!&lt;br&gt;
If you're not using Agrippa, join us! &lt;a href="https://github.com/NitzanHen/agrippa"&gt;Get started here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As for the new version, this one was in the works for longer than the previous two; integration tests, in particular, were a challenge to implement.&lt;br&gt;
Version 1.3.0 brings the following changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The separate-index scheme&lt;/strong&gt;: Agrippa's default component directories structure now separates the main component file, which contains the component's declaration and logic, from the &lt;code&gt;index&lt;/code&gt; file, which is the component directory's entry point. Previously, Agrippa placed the component logic under the &lt;code&gt;index&lt;/code&gt; file, which resulted in less files overall - but made it harder to distinguish between components in IDEs, which hurt the developer experience. Generated components should be easier to work with now! Many thanks to &lt;a href="https://github.com/wickedpuppy"&gt;@wickedpuppy&lt;/a&gt; for suggesting this feature.&lt;br&gt;
For more info, check out &lt;a href="https://github.com/NitzanHen/agrippa/wiki/The-complete-list-of-generation-options#separateindex"&gt;&lt;code&gt;separate-index&lt;/code&gt;&lt;/a&gt; on Agrippa's docs. &lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Support for React Native&lt;/strong&gt;: Agrippa now supports React Native projects! &lt;br&gt;
Furthermore, it can auto-detect a react native project by having the &lt;code&gt;react-native&lt;/code&gt; dependency in its &lt;code&gt;package.json&lt;/code&gt;,so you don't really need to configure anything in a typical project! Of course, styling with React Native's &lt;code&gt;StyleSheets&lt;/code&gt; is also supported (and, for React Native projects, also enforced).&lt;br&gt;
For more info, check out &lt;a href="https://github.com/NitzanHen/agrippa/wiki/The-complete-list-of-generation-options#reactnative"&gt;&lt;code&gt;reactNative&lt;/code&gt;&lt;/a&gt; on Agrippa's docs. &lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agrippa is now covered by integration tests&lt;/strong&gt;, as well as more unit tests.&lt;br&gt;
Integration tests were a challenge - since Agrippa is all about reading and writing files automatically, testing it effectively requires setting up and running in a completely isolated environment! We ended up combining Docker, Jest and some custom code to create a pretty sophisticated solution, and it works quite well.&lt;br&gt;
More tests are on the way, but the tool already has pretty good coverage. &lt;br&gt;&lt;br&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Tweaks &amp;amp; Bug fixes&lt;/strong&gt;: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;props&lt;/code&gt;=&lt;code&gt;ts&lt;/code&gt; can no longer be used without the &lt;code&gt;typescript&lt;/code&gt; flag; additionally, the &lt;code&gt;typescript&lt;/code&gt; flag now implies that &lt;code&gt;props&lt;/code&gt;=&lt;code&gt;ts&lt;/code&gt; (of course, this is overridden by any value set by the user). &lt;/li&gt;
&lt;li&gt;The &lt;code&gt;allowOutsideBase&lt;/code&gt; check is now skipped if &lt;code&gt;baseDir&lt;/code&gt; is not specified.&lt;/li&gt;
&lt;li&gt;Fixed a bug where &lt;code&gt;--children&lt;/code&gt; would generate &lt;code&gt;&amp;lt;div&amp;gt;children&amp;lt;/div&amp;gt;&lt;/code&gt; instead of &lt;code&gt;&amp;lt;div&amp;gt;{children}&amp;lt;/div&amp;gt;&lt;/code&gt; in the JSX template.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;&lt;em&gt;Your thoughts and feedback, as always, are most welcome&lt;/em&gt;.&lt;br&gt;
If you've found a bug with this release, or want to suggest a new feature, please &lt;a href="https://github.com/NitzanHen/agrippa/issues"&gt;submit an issue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Have a great week!&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>news</category>
    </item>
    <item>
      <title>You DON'T need these to be a web dev</title>
      <dc:creator>Nitzan Hen</dc:creator>
      <pubDate>Wed, 01 Dec 2021 00:18:43 +0000</pubDate>
      <link>https://dev.to/nitzanhen/you-dont-need-these-to-be-a-web-dev-c3b</link>
      <guid>https://dev.to/nitzanhen/you-dont-need-these-to-be-a-web-dev-c3b</guid>
      <description>&lt;p&gt;&lt;em&gt;"If you don't know all of these, don't call yourself a web developer"&lt;/em&gt;, followed by some list of web dev related terms. Have you encountered one of these posts before? I come across them every once in a while on social media.&lt;/p&gt;

&lt;p&gt;These sorts of divisive claims bring about nothing but toxicity to our community, and only alienate the junior developers who are new to it. Especially for the profit of some traffic on Twitter or elsewhere, it's despicable.&lt;/p&gt;

&lt;p&gt;They paint a completely wrong image of the web dev scene, too - being a web developer is much more about the perpetual process of self-improving, learning new tools &amp;amp; technologies and experimenting with methods to combine them in the best way, rather than knowing some constant list of terms (which are often occasionally useful at best). And, built on top of the open-source industry, the web dev industry is one of the most welcoming industries out there, to programmers of any caliber.&lt;/p&gt;

&lt;p&gt;So, to be perfectly clear - &lt;strong&gt;you don't need to know &lt;a href="https://stackoverflow.com/questions/111102/how-do-javascript-closures-work"&gt;closures&lt;/a&gt;, &lt;a href="https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/"&gt;the event loop&lt;/a&gt;, &lt;a href="https://www.digitalocean.com/community/tutorials/understanding-hoisting-in-javascript"&gt;hoisting&lt;/a&gt;, etc. to be a web developer&lt;/strong&gt;. The same goes for non-niche concepts &amp;amp; technologies - you can be a good dev without knowing &lt;a href="https://docs.docker.com/get-started/overview/"&gt;Docker&lt;/a&gt;, &lt;a href="https://www.infoworld.com/article/3613715/what-is-functional-programming-a-practical-guide.html"&gt;FP&lt;/a&gt;/&lt;a href="https://searchapparchitecture.techtarget.com/definition/object-oriented-programming-OOP"&gt;OOP&lt;/a&gt; or &lt;a href="https://azure.microsoft.com/en-us/overview/what-is-cloud-computing/"&gt;cloud computing&lt;/a&gt;, for example. Knowledge is always good to have, so if you're not familiar with them you should aspire to learn them sometime, but you can also be a damn good developer without them.&lt;/p&gt;

&lt;p&gt;I think my personal journey is a good indication to this point: I was met with web development close to three years ago, when I began my mandatory service; beforehand I knew some Java, from school and from coding as a hobby. The "tutoring" I received consisted of one half-baked, 30 minute lesson about the basics of HTML, and my "training period" consisted of watching some YouTube tutorials for close to two weeks, after which I was already being assigned tasks (that I was obviously not ready for). &lt;br&gt;
Virtually all of my knowledge and experience was gained on-the-job, much of it through ad-hoc googling, and it was months before I actually went back and strengthened my knowledge on the fundamentals. And, for an even longer time, concepts like &lt;a href="https://www.youtube.com/watch?v=4KHiSt0oLJ0"&gt;CORS&lt;/a&gt;, &lt;a href="https://owasp.org/www-community/attacks/xss/"&gt;XSS&lt;/a&gt; and &lt;a href="https://reactjs.org/docs/faq-internals.html"&gt;Virtual DOM&lt;/a&gt; remained unclear to me.&lt;/p&gt;

&lt;p&gt;It's not like I'm at the top of the industry today (still working on it!) but I've definitely gained a lot of experience and knowledge as a web developer, and have created some awesome projects along the way. &lt;strong&gt;And you can too!&lt;/strong&gt; don't let anybody deter you from it.&lt;/p&gt;

&lt;p&gt;My bottom line is - don't let any random list of technical terms discredit your journey as a developer. &lt;em&gt;Be proud of what you know&lt;/em&gt;, and be curious in what you don't. &lt;/p&gt;

&lt;p&gt;And, perhaps most importantly, be a good person; see people, not their labels, and invest energy in helping them improve instead of discouraging them from doing so.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>How are you using Styled Components?</title>
      <dc:creator>Nitzan Hen</dc:creator>
      <pubDate>Sat, 27 Nov 2021 00:11:17 +0000</pubDate>
      <link>https://dev.to/nitzanhen/how-are-you-using-styled-components-3jhi</link>
      <guid>https://dev.to/nitzanhen/how-are-you-using-styled-components-3jhi</guid>
      <description>&lt;p&gt;Hello!&lt;br&gt;
Have you ever used &lt;a href="https://styled-components.com/"&gt;style-components&lt;/a&gt; in a React project before? And, more generally, what are your thoughts of it?&lt;/p&gt;

&lt;p&gt;I'm asking because we want to implement &lt;code&gt;styled-components&lt;/code&gt; support for &lt;a href="https://github.com/NitzanHen/agrippa"&gt;Agrippa&lt;/a&gt;, &lt;a href="https://dev.to/nitzanhen/meet-agrippa-the-react-cli-for-component-generation-26pk"&gt;the React CLI for component generation&lt;/a&gt;! In fact, it's the second issue opened on our GitHub repository!&lt;/p&gt;

&lt;p&gt;However, I unfortunately have never personally used &lt;code&gt;styled-components&lt;/code&gt; in a production project, and while I did propose an implementation on &lt;a href="https://github.com/NitzanHen/agrippa/issues/2"&gt;the GitHub issue&lt;/a&gt;, it would definitely be better to hear an experienced input.&lt;/p&gt;

&lt;p&gt;From what I've seen, different teams have used this tool in many different ways over the years. &lt;br&gt;
Therefore, I'd love to hear your own experience with it, and how you're using it!&lt;br&gt;
&lt;strong&gt;Even if you've used it in a small project or casually, speak up!&lt;/strong&gt; the more experiences, the better - we could all learn something new as a result.&lt;/p&gt;

&lt;p&gt;If you prefer, you're also more than welcome to join the discussion on the mentioned GitHub issue at &lt;a href="https://github.com/NitzanHen/agrippa/issues/2"&gt;Add support for styled components&lt;/a&gt;, and &lt;a href="https://github.com/NitzanHen/agrippa"&gt;join the Agrippa community&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Thank you for your time!&lt;/p&gt;

&lt;p&gt;(Cover image is from &lt;code&gt;styled-components&lt;/code&gt;' docs, at &lt;a href="https://styled-components.com/meta.png"&gt;https://styled-components.com/meta.png&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>discuss</category>
      <category>css</category>
    </item>
    <item>
      <title>Agrippa 1.2 is out 🎉🎉</title>
      <dc:creator>Nitzan Hen</dc:creator>
      <pubDate>Thu, 21 Oct 2021 08:42:10 +0000</pubDate>
      <link>https://dev.to/nitzanhen/agrippa-12-is-out-13jl</link>
      <guid>https://dev.to/nitzanhen/agrippa-12-is-out-13jl</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/NitzanHen/agrippa"&gt;Agrippa&lt;/a&gt; is growing steadily - it's been out for a little over two months, and already has a small community around it! 🎉🎉&lt;/p&gt;

&lt;p&gt;If you're not using Agrippa yet, &lt;a href="https://github.com/NitzanHen/agrippa"&gt;get started here&lt;/a&gt;. If you &lt;em&gt;are&lt;/em&gt; using Agrippa, thanks for being part of the community! Let us know what you think about it, here or elsewhere.&lt;/p&gt;

&lt;p&gt;Either way, these are the changes introduced in v1.2.0:&lt;/p&gt;

&lt;p&gt;In general, the two main changes brought about in v1.2.0 are more options, this time with a focus on supporting different structural conventions that exist among React developers.&lt;/p&gt;

&lt;p&gt;Most notably, you can now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;export a component as a default export (instead of a named export)&lt;/li&gt;
&lt;li&gt;declare a component as a &lt;code&gt;function()&lt;/code&gt; declaration (instead of as a &lt;code&gt;const&lt;/code&gt; with an arrow function)&lt;/li&gt;
&lt;li&gt;create &lt;code&gt;memo()&lt;/code&gt; components.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These changes came as part of a larger reform in component generation. Generation logic was remade from the ground up - instead of a large, unwieldy template, we now have proper composition patterns and a &lt;code&gt;ComponentComposer&lt;/code&gt;; internal terminology aside, this reform makes it much easier to scale, maintain and test the generation logic.&lt;/p&gt;

&lt;p&gt;Following this reform, we have begun the process of writing standardized tests - testing for some of the core code already exists, and the rest will be covered in the soon future.&lt;/p&gt;

&lt;p&gt;In parallel, we got some bonus enhancements - the API docs were rewritten and are now both comprehensive and easy to read, and Agrippa will also now search for a new version when run, so that you'll always be informed when a new version is available.&lt;/p&gt;

&lt;p&gt;You can also find this information at the release page.&lt;/p&gt;

&lt;p&gt;That's pretty much it! We already have some ideas for v1.3.0 - we're currently looking into adding support for styled-components, React native &lt;code&gt;Stylesheets&lt;/code&gt; and &lt;code&gt;Mui 5&lt;/code&gt; styling, writing more tests and more.&lt;/p&gt;

&lt;p&gt;Join the community! If you haven't, try Agrippa out, and if you find a bug in Agrippa or want to suggest a new feature, please reach out here or on GitHub.&lt;/p&gt;

&lt;p&gt;Thanks for your time, have a great day!&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>news</category>
    </item>
    <item>
      <title>Agrippa v1.1.0 introduces base directories and post commands</title>
      <dc:creator>Nitzan Hen</dc:creator>
      <pubDate>Tue, 07 Sep 2021 16:06:34 +0000</pubDate>
      <link>https://dev.to/nitzanhen/agrippa-v1-1-0-introduces-base-directories-and-post-commands-ogo</link>
      <guid>https://dev.to/nitzanhen/agrippa-v1-1-0-introduces-base-directories-and-post-commands-ogo</guid>
      <description>&lt;p&gt;About a month ago, the first production version of &lt;a href="https://github.com/NitzanHen/agrippa"&gt;Agrippa&lt;/a&gt; was published, and I announced it in my first post on dev.to, &lt;a href="https://dev.to/nitzanhen/meet-agrippa-the-react-cli-for-component-generation-26pk"&gt;Meet Agrippa, the React CLI for component generation&lt;/a&gt;. I was honored at the amount of positive feedback for the project (thank you all!!), and had immediately started working on improving the tool further. &lt;/p&gt;

&lt;h1&gt;
  
  
  v1.1.0
&lt;/h1&gt;

&lt;p&gt;A few days ago, &lt;a href="https://github.com/NitzanHen/agrippa"&gt;v1.1.0 of Agrippa was officially released!&lt;/a&gt; 🎉&lt;/p&gt;

&lt;p&gt;The new version introduces two important new features for the React CLI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Base component directory:&lt;/strong&gt; projects can now specify a base directory, under which all components be generated! this makes Agrippa much more convenient to use in real projects, and can prevent developers from accidentally generating components in the wrong places.
Read more about the base directory in the wiki page, &lt;a href="https://github.com/NitzanHen/agrippa/wiki/Using-baseDir-and-dest"&gt;using baseDir and dest&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Post command:&lt;/strong&gt; users can now also specify a command to be run after generating a component, with the ability to inject into it dynamic paths (e.g. the component's path). For example, users use the post command to open new components in their favorite IDE automatically after generating them!
For common recipes and more info, refer to the &lt;a href="https://github.com/NitzanHen/agrippa/wiki/Post-Command-cookbook-%F0%9F%8D%B2"&gt;Post Command cookbook 🍲&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;v1.1.0 also improves logging of info, debug information (with &lt;code&gt;--debug&lt;/code&gt;) and errors.&lt;br&gt;
Additionally, dependency versions were bumped (though this should have no impact on usage).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;To update, call &lt;code&gt;npm i -g agrippa&lt;/code&gt; (or, to use the new version directly, call &lt;code&gt;npx agrippa [...]&lt;/code&gt;).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Also, &lt;a href="https://github.com/NitzanHen/agrippa/wiki"&gt;we have a wiki now!&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  What's next?
&lt;/h1&gt;

&lt;p&gt;Agrippa is still growing; I have some ideas in mind about how to improve Agrippa further, including more options and features, more standardized testing, more docs, etc. &lt;/p&gt;

&lt;p&gt;That being said, Agrippa is meant to be useful to many React developers in many environments, including you! therefore, if you use Agrippa, and have found a bug or want to suggest an improvement, please &lt;a href="https://github.com/NitzanHen/agrippa/issues"&gt;open up an issue on GitHub&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;One of the features currently in the works is &lt;a href="https://github.com/NitzanHen/agrippa/issues/2"&gt;support for styled-components&lt;/a&gt;. I, personally, am not too familiar with &lt;code&gt;styled-components&lt;/code&gt;, so if you're using it, any suggestion or input about what can be useful for you is most appreciated! to join the discussion, see &lt;a href="https://github.com/NitzanHen/agrippa/issues/2"&gt;Add support for styled components&lt;/a&gt; on GitHub.&lt;/p&gt;

&lt;p&gt;Also, we're considering opening a Twitter account for Agrippa, so be on the lookup for that!&lt;/p&gt;

&lt;p&gt;Finally, if you like Agrippa, please spread around its word!&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Meet Agrippa, the React CLI for component generation</title>
      <dc:creator>Nitzan Hen</dc:creator>
      <pubDate>Tue, 10 Aug 2021 21:06:40 +0000</pubDate>
      <link>https://dev.to/nitzanhen/meet-agrippa-the-react-cli-for-component-generation-26pk</link>
      <guid>https://dev.to/nitzanhen/meet-agrippa-the-react-cli-for-component-generation-26pk</guid>
      <description>&lt;p&gt;Finally, after over two years of writing the boilerplate of React components by hand, I'd decided to make snippets for them. However, I find myself working in quite a number of different environments (Typescript or JavaScript, different styling solutions, etc.), and it quickly became apparent that to accommodate for each and every reasonable combination, I'd be writing at least as much boilerplate as I'd sought to avoid.&lt;/p&gt;

&lt;p&gt;To this end (as well as the desire to do something cool), I wrote a small CLI - &lt;a href="https://github.com/NitzanHen/agrippa"&gt;Agrippa&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As the documentation reads,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"[Agrippa's] purpose is to assist React developers in creating components without the boilerplate. It can easily generate templates for React components of different compositions (styling solutions, prop validations, etc.) and in different environments."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Agrippa's leading features are:&lt;br&gt;
🚀 &lt;strong&gt;Ease of use&lt;/strong&gt; in both new and existing projects.&lt;br&gt;
🐙 &lt;strong&gt;Flexibility&lt;/strong&gt; - agrippa strives to be useful in many different circumstances.&lt;br&gt;
🧠 &lt;strong&gt;Smart defaults&lt;/strong&gt; - agrippa can detect and set defaults based on your environment's configuration, with no extra steps.&lt;br&gt;
⚙️ &lt;strong&gt;Configurability&lt;/strong&gt; - by using a plain old JSON file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;

&lt;p&gt;To get started with Agrippa, install it using &lt;code&gt;npm i -g agrippa&lt;/code&gt; (or &lt;code&gt;yarn global add agrippa&lt;/code&gt;).&lt;br&gt;
Once installed, components can be generated using &lt;code&gt;agrippa gen &amp;lt;name&amp;gt; [options]&lt;/code&gt;! &lt;/p&gt;

&lt;p&gt;Some of the options supported by &lt;code&gt;agrippa gen&lt;/code&gt; are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--styling&lt;/code&gt;: which styling solution to use (e.g. CSS, SCSS, JSS, Material-UI).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--props&lt;/code&gt;: which prop validation/definition solution to use (e.g. Typescript interfaces, prop-types, JSDoc comments).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--children&lt;/code&gt;: whether the components is meant to have children or not.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also, Agrippa &lt;strong&gt;automatically detects and sets&lt;/strong&gt; other, important defaults for you, such as whether to use &lt;strong&gt;Typescript or Javascript&lt;/strong&gt;, and whether to &lt;strong&gt;import React or not&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;An exhaustive list of options and defaults, as well as more information, can be found in the &lt;a href="https://github.com/NitzanHen/agrippa#usage"&gt;GitHub repo&lt;/a&gt; or the &lt;a href="https://www.npmjs.com/package/agrippa"&gt;npm page&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Community
&lt;/h3&gt;

&lt;p&gt;My ambition is that Agrippa would become a tool that makes the lives of React developers easier, but perhaps more importantly one that they enjoy using. The tool's ease-of-use at the practical level is one aspect of that, but just as important is the cultivation of an active, positive community around it that developers feel welcome in.&lt;/p&gt;

&lt;p&gt;Therefore, I invite you - yes, you - to become part of Agrippa's community. Your thoughts, suggestions and collaboration are most welcome.&lt;/p&gt;

&lt;p&gt;Links: &lt;a href="https://github.com/NitzanHen/agrippa"&gt;GitHub&lt;/a&gt;, &lt;a href="https://www.npmjs.com/package/agrippa"&gt;npm&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
