Gathering detailed insights and metrics for generator-wow-react
Gathering detailed insights and metrics for generator-wow-react
Gathering detailed insights and metrics for generator-wow-react
Gathering detailed insights and metrics for generator-wow-react
npm install generator-wow-react
Typescript
Module System
44.2
Supply Chain
77
Quality
76.1
Maintenance
25
Vulnerability
95.6
License
JavaScript (85.98%)
TypeScript (10.55%)
MDX (2.69%)
SCSS (0.78%)
Total Downloads
4,306
Last Day
1
Last Week
14
Last Month
60
Last Year
1,424
65 Commits
1 Watching
3 Branches
3 Contributors
Latest Version
2.0.7
Package Id
generator-wow-react@2.0.7
Unpacked Size
27.47 kB
Size
7.73 kB
File Count
29
Publised On
26 Sept 2024
Cumulative downloads
Total Downloads
Last day
-66.7%
1
Compared to previous day
Last week
-58.8%
14
Compared to previous week
Last month
-9.1%
60
Compared to previous month
Last year
-33.2%
1,424
Compared to previous year
This module will help you to create structural directory folder for generating component, feature. Our case we work on SBDUI Library.
npm install -g yarn
When using generator-wow-react you can simply generate your component or feature on your react project application
You can configure the generator settings by modifying the .yo-rc.json file. Here are the available options:
componentGeneratedDirPath
: The directory path where generated components will be placed (e.g., "src/app/components").
featureDirPath
: The base directory for feature modules (e.g., "src/app/features").
featureGeneratedFolders
: A comma-separated list of subfolders within each feature module (e.g., "services, components, hooks, types"). Use this to segment your code logically.
generateStorybookComponent
: Set to true if you want to generate Storybook stories for your components.
generateTestComponent
: Set to true if you want to generate test files for your components.
storyFolder
: The folder where Storybook stories will be created (e.g., "src/stories").
generateHelperComponent
: Set to true if you want to generate helper components.
Register the command on your package.json file to recognize the generator as part of your cli
open package.json
add these line under scripts property
"scripts": {
...
"wow:component": "yo wow-react:component",
"wow:feature": "yo wow-react:feature",
}
save the modification
run the command using yarn
or npm run
yarn wow:component YourComponentName.Prefix --path /your/custom/path
yarn wow-component ComponentName
it will make directory folder like this
└── src/
└── ui/
└── component/
└── ComponentName/
├── _test_/
│ └── ComponentName.test.tsx
├── story/
│ ├── ComponentName.story.mdx
│ └── ComponentName.story.tsx
├── ComponentName.module.scss
├── ComponentName.tsx
├── ComponentNameHelper.ts
└── index.ts
If you want to make a root component grouping example Chart/BarChart, you can use syntax like this
yarn wow-component RootComponentName/ComponentName
it will make directory folder like this
└── src/
└── ui/
└── component/
└── RootComponentName/
└── ComponentName/
├── _test_/
│ └── ComponentName.test.tsx
├── story/
│ ├── ComponentName.story.mdx
│ └── ComponentName.story.tsx
├── ComponentName.module.scss
├── ComponentName.tsx
├── ComponentNameHelper.ts
└── index.ts
yarn wow-feature NameFeature
it will make directory folder like this
└── src/
└── features/
└── component/
├── FeatureName/
│ ├── _test_/
│ │ └── FeatureName.test.tsx
│ ├── story/
│ │ ├── FeatureName.story.mdx
│ │ └── FeatureName.story.tsx
│ ├── FeatureName.module.scss
│ ├── FeatureName.tsx
│ ├── FeaHelpertureName.ts
│ └── index.ts
├── hooks/
│ └── chart.hook.ts
├── services/
│ └── chart.service.ts
├── types/
│ └── chart.type.ts
└── index.ts
yarn wow-component OtherFeatureComponent --path src/features/RootFeature
it will make directory folder like this
└── src/
└── features/
└── component/
├── FeatureName/
│ ├── _test_/
│ │ └── FeatureName.test.tsx
│ ├── story/
│ │ ├── FeatureName.story.mdx
│ │ └── FeatureName.story.tsx
│ ├── FeatureName.module.scss
│ ├── FeatureName.tsx
│ ├── FeaHelpertureName.ts
│ └── index.ts
├── hooks/
│ └── chart.hook.ts
├── services/
│ └── chart.service.ts
├── types/
│ └── chart.type.ts
└── index.ts
└── component/
├── OtherFeatureComponent/
│ ├── _test_/
│ │ └── OtherFeatureComponent.test.tsx
│ ├── story/
│ │ ├── OtherFeatureComponent.story.mdx
│ │ └── OtherFeatureComponent.story.tsx
│ ├── OtherFeatureComponent.module.scss
│ ├── OtherFeatureComponent.tsx
│ ├── FeaHelpertureName.ts
│ └── index.ts
├── hooks/
│ └── chart.hook.ts
├── services/
│ └── chart.service.ts
├── types/
│ └── chart.type.ts
└── index.ts
example
yarn wow-component Test --path src\features\AccountInformation\components
on your project root directory
using npm
npm install yo generator-wow-react
using yarn
1 yarn add -D yo generator-wow-react
1 yo wow-react:component <ComponentName> -path <AlternativePath>
1 yo wow-react:feature <FeatureName> -path <AlternativePath>
generator-wow-react initially save the configuration in yo-rc.json
1"generator-wow-react": { 2 "featureDirPath": "src/main/webapp/app/modules", 3 "featureGeneratedFolders": "services, components, hooks, types, utils, __tests__", 4 "componentGeneratedDirPath": "src/main/webapp/app/components", 5 "generateTestComponent": true, 6 "generateStorybookComponent": false 7 }
update the configuration based on your needs
git clone https://github.com/awim/generator-wow-react.git
yarn install
yarn link
yarn link generator-wow-react
No vulnerabilities found.
No security vulnerabilities found.