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.
- 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.
- 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
.
You can install the library using npm:
npm install vite-cra-watcher
- 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
Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.