2.0.1 β€’ Published 1 year ago

gsharpi v2.0.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 year ago

🎯 gsharpi : Automatic Package Installer ( React + vite )

gsharpi-plugin is a Vite plugin that revolutionizes your workflow by automatically detecting and installing missing npm packages. Say goodbye to the tedious task of manually managing your dependenciesβ€”let gsharpi-plugin handle it for you, in real-time, while you code!

πŸ“₯ Installation

To get started with gsharpi-plugin, follow these steps:

  1. Install Dependencies:

    npm install
  2. Integrate Plugin in your vite.config.js:

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { gsharpi } from 'gsharpi'

export default defineConfig({
  plugins: [react(), gsharpi()],
})
3. **Run Your Vite Server**:

```bash
npm run dev

The plugin will now watch your files and automatically install any missing npm packages it detects!

πŸ› οΈ Usage

Once set up, gsharpi-plugin works behind the scenes. Here's an example:

Example Code

import React from 'react';
import axios from 'axios';
import AddShoppingCartIcon from '@mui/icons-material/AddShoppingCart';
import _ from 'lodash/fp';

Upon saving your file, the plugin will automatically install:

  • react
  • axios
  • @mui/icons-material
  • lodash

Folder Structure

Ensure your project structure looks like this:

project-root/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ App.js or App.jsx
β”‚   β”œβ”€β”€ other files
β”œβ”€β”€ package.json
β”œβ”€β”€ vite.config.js
└── node_modules/

πŸ“‚ How It Works

  • File Watching: Uses chokidar to monitor changes in your src/ folder.
  • Import Detection: Scans files with regex for import and require statements.
  • Automatic Installation: Installs missing dependencies using npm install automatically.

πŸ”§ Commands

  • npm run dev: Starts the Vite development server and automatically watches for missing packages.
  • npm install <package-name>: Manually install a package if needed.

πŸ“‹ Requirements

  • Node.js: v14 or later
  • npm: v6 or later
  • Vite: v5 or later

πŸ“ˆ Future Enhancements

We have some exciting plans for gsharpi-plugin:

  • πŸ”„ Support for pnpm and yarn package managers.
  • πŸ“‚ Ability to monitor additional directories.
  • πŸ› οΈ Enhanced error handling and reporting for failed installations.

πŸ’‘ Why gsharpi-plugin?

Whether you're an experienced developer or just starting out, gsharpi-plugin is designed to save you time by automating mundane tasks, keeping you focused on writing great code.

πŸ“œ License

This project is licensed under the Apache-2.0 License.


πŸ’¬ Stay in Touch

We’d love to hear from you! Feel free to contribute, ask questions, or suggest improvements!


With gsharpi-plugin, automating package installations becomes a seamless part of your workflow. Enjoy coding while we handle the rest! πŸŽ‰


This enhanced README has a clean and appealing structure, highlights key features, and provides a good balance of technical information and visual appeal. Feel free to customize it further to match your project!

πŸ’¬ Author

MR GAURI SHANKAR KHADGA

❀️ KEEP CODING ❀️

2.0.1

1 year ago

2.0.0

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago