New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-folder-generator

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-folder-generator

A CLI tool to generate React component folders with TypeScript and CSS files

Source
npmnpm
Version
2.0.2
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Component Generator CLI

A simple Node.js CLI tool to scaffold React component boilerplate with flexible styling options.

🚀 Features

  • Supports JavaScript (.jsx) and TypeScript (.tsx)
  • Supports multiple styling formats: CSS, SCSS, CSS Modules, SCSS Modules
  • Optional scoped styling
  • Auto-generates component and style files
  • Validates input and prevents overwriting existing components

📦 Installation

Make sure you have Node.js installed.

npm install -g <your-cli-package-name>

Or if using locally:

git clone https://github.com/<your-github-username>/<repo-name>.git
cd <repo-name>
npm install

🔧 Usage

generate-component <ComponentName> [options]

📘 Examples

Basic Component (JSX + CSS)

generate-component Button

Creates:

  • Button/index.jsx
  • Button/index.css

TypeScript + SCSS Module + Scoped Style

generate-component AlertBox --ts --module-scss --scoped-style

Creates:

  • AlertBox/AlertBox.tsx
  • AlertBox/AlertBox.module.scss

JavaScript + SCSS

generate-component Card --scss

Creates:

  • Card/index.jsx
  • Card/index.scss

TypeScript + CSS Module

generate-component Modal --ts --module-css

Creates:

  • Modal/index.tsx
  • Modal/index.module.css

🛠 Options

OptionDescription
--tsUse TypeScript (.tsx)
--jsUse JavaScript (.jsx) (default)
--cssInclude plain CSS
--scssInclude SCSS
--module-cssUse CSS Modules
--module-scssUse SCSS Modules
--scoped-styleUse scoped style file with component name

⚠️ You can only choose one of --css, --scss, --module-css, or --module-scss per component.

📁 Output Structure

When using:

generate-component Example --ts --scss --scoped-style

It creates:

Example/
├── Example.tsx
└── Example.scss

👤 Author

Afriduzzaman
Experienced Web Developer | React, Angular, Ionic, React Native
GitHub: https://github.com/Thetourist2051
Email: [thetourist2051@gmail.com]

📝 License

MIT

Feel free to contribute or raise issues!

Keywords

react

FAQs

Package last updated on 08 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts