<?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: Bernardo de Melo Matuchewski</title>
    <description>The latest articles on DEV Community by Bernardo de Melo Matuchewski (@berpgr).</description>
    <link>https://dev.to/berpgr</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%2F3728500%2F8f6684e2-467e-4729-8a9c-6e05fa70e195.png</url>
      <title>DEV Community: Bernardo de Melo Matuchewski</title>
      <link>https://dev.to/berpgr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/berpgr"/>
    <language>en</language>
    <item>
      <title>I created my first NPM CLI package (for VueJS) Projects</title>
      <dc:creator>Bernardo de Melo Matuchewski</dc:creator>
      <pubDate>Fri, 23 Jan 2026 12:39:35 +0000</pubDate>
      <link>https://dev.to/berpgr/i-created-my-first-npm-cli-package-for-vuejs-projects-cpj</link>
      <guid>https://dev.to/berpgr/i-created-my-first-npm-cli-package-for-vuejs-projects-cpj</guid>
      <description>&lt;p&gt;To be honest, this was a really cool experience. Among the various ways we have to create files — like using the touch command or clicking buttons in VSCode—I thought: "Why not create a command and publish it on NPM for anyone who wants to use it?"&lt;/p&gt;

&lt;p&gt;So, I did it. I created an NPM package called &lt;strong&gt;vue-gen-component&lt;/strong&gt;. As mentioned in the title, it only works for Vue (for now, anyway!).&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Installation is simple: &lt;code&gt;npm install -g vue-gen-component&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;Go to the root of your Vue project and run: &lt;code&gt;v-create [name]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you don't provide a name, you will be prompted with three options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name&lt;/li&gt;
&lt;li&gt;Language (TS or JS)&lt;/li&gt;
&lt;li&gt;Script Setup (Yes/No) default is Yes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Here is an example of it in action:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;v-create 
? Component name: Dev 
? Select language: ts 
? Use script setup? Yes 
📂 Folder src/components not found. Creating... 
✅ Component Dev.vue successfully created at: src/components/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is what the component looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h1&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="nx"&gt;Dev&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h1&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/template&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="nx"&gt;setup&lt;/span&gt; &lt;span class="nx"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Future Plans&lt;/strong&gt;: I intend to expand this tool soon. My goal is to allow users to choose exactly which folder they want to create the component in, add a check to see if the file already exists, and potentially include styling options—since many people skip the styles tag nowadays due to Tailwind and other libraries.&lt;/p&gt;

&lt;p&gt;Package link: &lt;a href="https://www.npmjs.com/package/vue-gen-component" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/vue-gen-component&lt;/a&gt;&lt;/p&gt;

</description>
      <category>web</category>
      <category>vue</category>
      <category>npm</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
