1.4.7 • Published 1 year ago

my-component-generator v1.4.7

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

React Component Generator

This npm package allows you to quickly generate new components in your React application. This component generator uses mkdirp, fs, and path packages to create a new component folder, with an index file, a .jsx file, and a .module.css file.

Installation

To install this package, add it to your devDependencies in the package.json file and run the following command:

npm install

Add Script

Create a new script in your package.json file by adding the following line to the scripts object:

"new-component": "my-component-generator"

Usage

To generate a new component, run the following command:

npm run new-component [component-name] [directory]

component-name is the name you want to give to your new component. directory is optional and represents the directory where you want to create the new component. By default, the component will be created in a folder named components inside the src folder.

Configuration

This component generator uses a default template for the component. If you want to customize the component template, you can modify the jsxContent and cssContent variables in the index.js file.

Additionally, you can configure the package by modifying the variables at the top of the index.js file. These variables include:

  • componentName: the name of the component file
  • directory: the directory where the new component should be created
1.4.6

1 year ago

1.4.5

1 year ago

1.4.4

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.9

1 year ago

1.4.7

1 year ago

1.3.8

1 year ago

1.3.7

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago