Gathering detailed insights and metrics for autoremover-import
Gathering detailed insights and metrics for autoremover-import
npm install autoremover-import
Typescript
Module System
Node Version
NPM Version
52.7
Supply Chain
96.6
Quality
85.9
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
610
Last Day
1
Last Week
4
Last Month
49
Last Year
610
2 Stars
14 Commits
1 Watching
2 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
1.4.0
Package Id
autoremover-import@1.4.0
Unpacked Size
27.65 kB
Size
7.38 kB
File Count
8
NPM Version
10.5.1
Node Version
22.0.0
Publised On
05 Dec 2024
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-80%
4
Compared to previous week
Last month
-91.3%
49
Compared to previous month
Last year
0%
610
Compared to previous year
Automatically manage your JavaScript/React project dependencies by analyzing imports in real-time. Never worry about unused dependencies or missing packages again!
1npm install autoremover-import 2# or 3yarn add autoremover-import
1npx autoremover-import init
1npm run watch-imports 2# or 3yarn watch-imports
1const ImportManager = require('autoremover-import'); 2 3// Initialize with your project path 4const manager = new ImportManager(__dirname); 5 6// Start watching for changes 7manager.start().catch(error => { 8 console.error('Error:', error); 9 process.exit(1); 10});
1const ImportManager = require('autoremover-import'); 2const path = require('path'); 3 4const manager = new ImportManager(__dirname); 5 6async function run() { 7 try { 8 await manager.start(); 9 console.log('โจ Import manager is now watching for changes'); 10 11 // Keep the process running 12 process.stdin.resume(); 13 14 // Handle graceful shutdown 15 process.on('SIGINT', () => { 16 console.log('Stopping import manager...'); 17 manager.stop(); 18 process.exit(0); 19 }); 20 } catch (error) { 21 console.error('Error:', error); 22 process.exit(1); 23 } 24} 25 26run();
Create an import-manager.config.js
file in your project root:
1module.exports = { 2 // Packages that will never be removed automatically 3 ignoredPackages: [ 4 'react', 5 'typescript' 6 ], 7 8 // Watcher configuration 9 watcherConfig: { 10 watchOnSave: true, // Watch for file changes 11 watchInterval: 1000, // Check interval in milliseconds 12 ignoredPaths: [ // Paths to ignore 13 'node_modules', 14 'dist', 15 'build', 16 '.next', 17 '*.test.*', 18 'package.json', 19 'package-lock.json' 20 ], 21 fileExtensions: [ // File types to watch 22 '.js', 23 '.jsx', 24 '.ts', 25 '.tsx' 26 ] 27 }, 28 29 // Package.json configuration 30 packageJsonConfig: { 31 checkDevDependencies: false, // Whether to manage devDependencies 32 defaultVersion: 'latest', // Default version when installing new packages 33 safeMode: false, // Ask for confirmation before changes 34 packageManager: 'npm' // 'npm' or 'yarn' 35 }, 36 37 // Enable debug logs 38 debug: true 39};
['react', 'typescript']
true
: Real-time monitoringfalse
: Manual analysis onlytrue
: Manage both dependencies and devDependenciesfalse
: Only manage dependenciestrue
: Ask before any package changesfalse
: Automatic changes without confirmation'npm'
: Use npm commands'yarn'
: Use yarn commandsSupports various import syntaxes:
1// ES6 imports 2import axios from 'axios'; 3import { get, post } from 'axios'; 4import * as React from 'react'; 5 6// CommonJS requires 7const axios = require('axios'); 8const { get, post } = require('axios');
Some packages are protected by default and won't be removed:
autoremover-import
)ignoredPackages
When safeMode
is enabled:
1๐ค Do you want to install axios? (y/n): y 2๐ฅ Installing axios... 3โ axios installed successfully 4 5๐ค Do you want to remove moment? (y/n): n 6โญ๏ธ Skipping removal of moment
Contributions are welcome! Please feel free to submit a Pull Request.
MIT ยฉ [rs12]
No vulnerabilities found.
No security vulnerabilities found.