vite-cra-watcher
v2.0.2
Published
A library to automate React boilerplate code
Downloads
16
Maintainers
Readme
Vite CRA Watcher
vite-cra-watcher is an npm library that watches for new files in your React application's components
or pages
directories and automatically adds boilerplate code to them. This ensures that all new components and pages have a consistent starting structure.
Features - 1.x.x
- Watches for new files in
components
andpages
directories. - Supports
.jsx
,.js
,.tsx
, and.ts
file extensions. - Automatically adds boilerplate code to new files.
- Ensures all new components and pages follow a consistent structure.
Features - 2.x.x
- Automatically detects whether the react app is created with
Vite
orCRA
. - Clear up
App.css
andindex.css
file present insrc
directory. - Clear all the unnecessary code in
App.jsx
orApp.js
.
Installation
You can install the library using npm:
npm install vite-cra-watcher
Usage
- Add the script to package.json file
"scripts": {
"start:watcher": "vite-cra-watcher"
}
- Run the following command to start the watcher
npm run start:watcher
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.