<?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: Muhammad Dariaz Zidane</title>
    <description>The latest articles on DEV Community by Muhammad Dariaz Zidane (@muhammaddariazzidane).</description>
    <link>https://dev.to/muhammaddariazzidane</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%2F3840972%2F4473b29d-f67b-4a25-995c-2dc2ea52968f.jpg</url>
      <title>DEV Community: Muhammad Dariaz Zidane</title>
      <link>https://dev.to/muhammaddariazzidane</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammaddariazzidane"/>
    <language>en</language>
    <item>
      <title>Stop Resizing PWA Icons by Hand: I Built a CLI to Automate It in Seconds 🚀</title>
      <dc:creator>Muhammad Dariaz Zidane</dc:creator>
      <pubDate>Tue, 24 Mar 2026 03:04:44 +0000</pubDate>
      <link>https://dev.to/muhammaddariazzidane/stop-resizing-pwa-icons-by-hand-i-built-a-cli-to-automate-it-in-seconds-20ji</link>
      <guid>https://dev.to/muhammaddariazzidane/stop-resizing-pwa-icons-by-hand-i-built-a-cli-to-automate-it-in-seconds-20ji</guid>
      <description>&lt;p&gt;As frontend developers, we all love the idea of Progressive Web Apps (PWAs). But let's be honest: the initial setup is tedious.&lt;/p&gt;

&lt;p&gt;Every time I start a new React or Vite project, I find myself opening an image editor just to resize my master logo into 192x192, 512x512, apple-touch-icon, and favicon. Then, I have to manually write the manifest.json file and make sure all the paths are perfectly linked&lt;/p&gt;

&lt;p&gt;It kills the momentum. So, I decided to fix it.&lt;/p&gt;

&lt;p&gt;I built a lightweight, interactive CLI tool to automate the entire process. Just point it to your master image, answer a few prompts, and you're done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📦 Meet pwa-gen&lt;/strong&gt;&lt;br&gt;
You don't even need to install it. You can run it instantly in any of your project directories using npx:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx @muhammaddariazzidane/pwa-gen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.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%2Fzq5ff9w4fbypzp7wrz1r.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fzq5ff9w4fbypzp7wrz1r.gif" alt="CLI DEMO" width="560" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✨ What Does It Do?&lt;/strong&gt;&lt;br&gt;
Under the hood, this tool is powered by sharp (for blazing-fast image processing) and @clack/prompts (for that beautiful, modern terminal UI).&lt;/p&gt;

&lt;p&gt;Here is what it handles for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Instantly Generates Standard Icons&lt;/strong&gt;: Creates all the necessary sizes for modern browsers and iOS (192x192, 512x512, 180x180, 64x64).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Smart Maskable Icons&lt;/strong&gt;: Android PWAs need "safe zones" so your logo doesn't get cut off. The CLI asks for a hex background color, shrinks your logo slightly, and adds the perfect padding automatically.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Auto-Generates manifest.json&lt;/strong&gt;: It asks for your App Name and Theme Color, then writes a perfectly formatted standalone manifest file linked to your new absolute icon paths.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Smart Path Auto-Correction&lt;/strong&gt;: It automatically detects your public directory so you never accidentally generate files in the wrong place.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;⚡ Perfect for Vite Users&lt;/strong&gt;&lt;br&gt;
If you are using vite-plugin-pwa, managing the manifest directly inside vite.config.js/ts can get messy. pwa-gen asks if you are using Vite and automatically configures a standalone manifest.json in your public folder.&lt;/p&gt;

&lt;p&gt;You just need to tell your Vite config to use the generated file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VitePWA({
  manifest: false, // Tell the plugin to use our standalone manifest.json
  injectRegister: 'auto'
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;🤝 Let's Build Together&lt;/strong&gt;&lt;br&gt;
This is version 1.1.0 and my first open-source tooling project. I built it to solve my own itch, but I hope it speeds up your workflow too!&lt;/p&gt;

&lt;p&gt;You can check out the source code, inspect how I handled the Node.js file system logic, or contribute on GitHub:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;👉 &lt;a href="https://github.com/muhammaddariazzidane/pwa-gen.git" rel="noopener noreferrer"&gt;https://github.com/muhammaddariazzidane/pwa-gen.git&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
If you find this tool helpful, I'd really appreciate a ⭐ on GitHub! Let me know in the comments if you have any feature requests or feedback.&lt;/p&gt;

&lt;p&gt;Happy coding! 💻✨&lt;/p&gt;

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