<?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: Phil Ramirez</title>
    <description>The latest articles on DEV Community by Phil Ramirez (@philmirez).</description>
    <link>https://dev.to/philmirez</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%2F138046%2Fa5b25d34-3a1a-4317-a2fd-e97b3c4588e8.jpeg</url>
      <title>DEV Community: Phil Ramirez</title>
      <link>https://dev.to/philmirez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/philmirez"/>
    <language>en</language>
    <item>
      <title>Creating a Storybook Lerna package</title>
      <dc:creator>Phil Ramirez</dc:creator>
      <pubDate>Thu, 11 Mar 2021 16:56:52 +0000</pubDate>
      <link>https://dev.to/philmirez/creating-a-storybook-lerna-package-2a2b</link>
      <guid>https://dev.to/philmirez/creating-a-storybook-lerna-package-2a2b</guid>
      <description>&lt;h1&gt;
  
  
  Setup
&lt;/h1&gt;

&lt;p&gt;I'm writing this assuming you have knowledge and familiarity with setting up Lerna. Also, the scenario here is assuming you have a bunch of reusable components in their own dedicated package. Let me know if you have questions on steps that I cover at a high level.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup checklist
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Repo is setup
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;mkdir superDuperRepo&lt;/code&gt;&lt;br&gt;
&lt;code&gt;git init&lt;/code&gt;&lt;br&gt;
&lt;code&gt;git add .&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Lerna as a dev dependency
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;yarn init&lt;/code&gt;&lt;br&gt;
&lt;code&gt;yarn add lerna --dev&lt;/code&gt;&lt;br&gt;
&lt;code&gt;lerna init&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  lerna.json
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// superDuperRepo/lerna.json

{
  "packages": [
    "packages/*"
  ],
  "version": "independent",
  "npmClient": "yarn",
  "useWorkspaces": true
}

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  package.json
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// superDuperRepo/package.json

{
  "name": "superDuperRepo",
  "private": true,
  "workspaces": [
    "packages/*"
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Drop reusable components in their own package
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;superDuperRepo/packages/reusableComponents&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Add storybook as a package
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;lerna create storybook&lt;/code&gt;&lt;br&gt;
&lt;code&gt;cd packages/storybook&lt;/code&gt;&lt;br&gt;
&lt;code&gt;npx sb init&lt;/code&gt; // delete boilerplate stories&lt;br&gt;
&lt;code&gt;yarn add react&lt;/code&gt;&lt;br&gt;
&lt;code&gt;yarn add react-dom&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Yarn workspaces
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;yarn config set workspaces-experimental true&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Add reusable components package to the storybook package
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;lerna add landing --scope=storybook --dev&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Resolving reusable components package files
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// superDuperRepo/packages/storybook/.storybook/webpack.config.js

const path = require("path")

module.exports = ({ config }) =&amp;gt; {
  // a bunch of other rules here

  config.resolve.modules = [
    path.resolve(__dirname, "..", "..", "reusableComponents", "src"),
    "node_modules",
  ]

  /*
  // Alternately, for an alias:
  config.resolve.alias: {
    "@styles": path.resolve(__dirname, "..", "src", "styles")
  }
   */

  return config
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Creating the story
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// superDuperRepo/packages/storybook/stories/Button.stories.jsx

import React from 'react'
import Button from 'reusableComponents/src/Button'

export default {
  component: Button,
  title: 'Reusable Components/Button',
}

const Template = args =&amp;gt; &amp;lt;Button {...args} /&amp;gt;

export const Default = Template.bind({})

Default.args = {
  title: 'Submit'
}

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  Run Storybook
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;yarn storybook&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;At this point you should be able to run storybook and view the single story (especially if you deleted the boilerplate stories). It'd be lovely if there was an automated way of creating stories for all the components that I have. Still trying to figure that one out. &lt;/p&gt;

&lt;h3&gt;
  
  
  Helpful troubleshooting notes
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;lerna list&lt;/code&gt;&lt;br&gt;
&lt;code&gt;lerna bootstrap&lt;/code&gt;&lt;br&gt;
&lt;code&gt;lerna link&lt;/code&gt;&lt;br&gt;
&lt;code&gt;lerna changed&lt;/code&gt;&lt;br&gt;
&lt;code&gt;yarn workspaces info&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Lawyer Cat Zoom Filter Software</title>
      <dc:creator>Phil Ramirez</dc:creator>
      <pubDate>Wed, 10 Feb 2021 14:19:52 +0000</pubDate>
      <link>https://dev.to/philmirez/lawyer-cat-zoom-filter-software-48j1</link>
      <guid>https://dev.to/philmirez/lawyer-cat-zoom-filter-software-48j1</guid>
      <description>&lt;h1&gt;
  
  
  How to Use a Cat Filter Like the One in the Viral Zoom Courtroom Video
&lt;/h1&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;
      &lt;div class="ltag__twitter-tweet__media ltag__twitter-tweet__media__video-wrapper"&gt;
        &lt;div class="ltag__twitter-tweet__media--video-preview"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5e0-vJle--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/ext_tw_video_thumb/1359206933979357184/pu/img/GoklYFcSB1zffte1.jpg" alt="unknown tweet media content"&gt;
          &lt;img src="/assets/play-butt.svg" class="ltag__twitter-tweet__play-butt" alt="Play butt"&gt;
        &lt;/div&gt;
        &lt;div class="ltag__twitter-tweet__video"&gt;
          
            
          
        &lt;/div&gt;
      &lt;/div&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Tw9mSIwP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1180921256872435714/U3imP27I_normal.jpg" alt="Lawrence Hurley profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Lawrence Hurley
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        @lawrencehurley
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ir1kO05j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      “I’m here live, I’m not a cat,” says lawyer after Zoom filter mishap&lt;br&gt;&lt;br&gt;“I can see that,” responds judge 
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      18:26 PM - 09 Feb 2021
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1359207169091108864" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fFnoeFxk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-reply-action-238fe0a37991706a6880ed13941c3efd6b371e4aefe288fe8e0db85250708bc4.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1359207169091108864" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k6dcrOn8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-retweet-action-632c83532a4e7de573c5c08dbb090ee18b348b13e2793175fea914827bc42046.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/like?tweet_id=1359207169091108864" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SRQc9lOp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-like-action-1ea89f4b87c7d37465b0eb78d51fcb7fe6c03a089805d7ea014ba71365be5171.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;p&gt;TLDR&lt;br&gt;
Here is the &lt;a href="https://www.reallusion.com/creativeupgrade/Help/Enu/Default.asp"&gt;link&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Viral 'I'm not a cat' filter is decades-old software.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ae45O82L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ichef.bbci.co.uk/news/976/cpsprodpb/ED89/production/_116890806_catfilter.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ae45O82L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ichef.bbci.co.uk/news/976/cpsprodpb/ED89/production/_116890806_catfilter.png" alt="I'm not a cat"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Last night right before I fell asleep, I thought to myself (probably like thousands of others)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;HOW DO I GET THAT FILTER?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Unfortunately, it can't be run on Mac OS and looks like it has been designed to work on Windows 2000, XP, and Vista. From a security perspective I wouldn't touch the software. Here are a couple of snap filters that you can use for snap camera, but without the worried-wondering eyes it doesn't have the same effect.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.snapchat.com/unlock/?type=SNAPCODE&amp;amp;uuid=04b596246a234995b6fd23f26a760dab&amp;amp;metadata=01"&gt;Cat - Not a Lawyer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.snapchat.com/unlock/?type=SNAPCODE&amp;amp;uuid=d581a33325ca40ad907a2102ae16aee1&amp;amp;metadata=01"&gt;LawyerCat&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>lawyercat</category>
      <category>zoomfilter</category>
    </item>
  </channel>
</rss>
