承接 burakboz/killdeps 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

burakboz/killdeps

Composer 安装命令:

composer require burakboz/killdeps

包简介

A powerful cleaner and analyzer tool that efficiently scans and deletes 'vendor' and 'node_modules' directories in PHP and JavaScript development environments.

README 文档

README

Version PHP

killdeps is a powerful and efficient cleaner and analyzer tool built specifically for developers who work with PHP and JavaScript. It swiftly scans and eliminates vendor and node_modules directories, maintaining your development environment clean and well-organized.

Features

  • Swift and effective scanning of vendor and node_modules directories.
  • Secure elimination of unnecessary directories.
  • Comprehensive analysis of your project's environment.
  • User-friendly command-line interface.
  • Compatible with PHP 8+ and all modern JavaScript environments.
  • No dependency on third-party libraries.
  • Supports bun, yarn, npm lock files

Installation

To install killdeps, ensure that PHP 8.0 or higher and Composer are installed on your system.

Installation in a project

composer require burakboz/killdeps

How to run with composer?

# run via composer
composer killdeps -- --dry-run .
composer killdeps -- --help

# an alternative way
composer run-script killdeps -- --dry-run .
composer run-script killdeps -- --help

Installation on Windows using composer

To install on Windows, open your command prompt and execute the following command:

composer global require burakboz/killdeps

To add the ~/.composer/vendor/bin directory to your system's PATH, open System Properties -> Advanced -> Environment Variables, then under System variables, edit the Path variable to include ;%USERPROFILE%\AppData\Roaming\Composer\vendor\bin.

Installation on Windows using PowerShell

# Download the killdeps script
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/burakboz/killdeps/master/bin/killdeps" -OutFile "killdeps"

# Check if the ~/bin directory exists, create it if not
If(!(Test-Path "$env:USERPROFILE\bin"))
{
    New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\bin"
}

# Move the downloaded script to the ~/bin directory
Move-Item -Path .\killdeps -Destination "$env:USERPROFILE\bin"

# Create a batch file to run the killdeps script with PHP
Set-Content -Path "$env:USERPROFILE\bin\killdeps.bat" -Value "php %USERPROFILE%\bin\killdeps %*"

# Add the ~/bin directory to the system PATH
$env:Path += ";$env:USERPROFILE\bin"
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User)

Uninstallation on Windows using PowerShell

Remove-Item -Path "$env:USERPROFILE\bin\killdeps"
Remove-Item -Path "$env:USERPROFILE\bin\killdeps.bat"

Installation on Linux / macOS using composer

To install on Linux or macOS, open your terminal and execute the following command:

composer global require burakboz/killdeps

To add the ~/.composer/vendor/bin directory to your system's PATH, modify your shell profile file (e.g., ~/.bashrc, ~/.bash_profile, or ~/.zshrc) and add this line:

export PATH="$PATH:$HOME/.composer/vendor/bin"

Afterwards, run source ~/.bashrc (or the appropriate profile file for your shell) to update your current session.

Installation on Linux / macOS without composer

cd ~;(wget --no-check-certificate https://raw.githubusercontent.com/burakboz/killdeps/master/bin/killdeps -O killdeps || curl -LJO https://raw.githubusercontent.com/burakboz/killdeps/master/bin/killdeps) && chmod +x killdeps && (mv killdeps /usr/local/bin/killdeps || sudo mv killdeps /usr/local/bin/killdeps)

Uninstallation on Linux / macOS

(rm -f /usr/local/bin/killdeps || sudo rm -f /usr/local/bin/killdeps)

Usage

To execute killdeps, navigate to the directory you wish to clean and type:

killdeps .

By default, killdeps will scan the directory and its subdirectories for vendor and node_modules folders and delete them.

Examples

killdeps --help
# Show help

killdeps . 
# Deletes vendor and node_modules folders in the current directory

killdeps D:
# Deletes vendor and node_modules folders in the D: drive

killdeps --dry-run .
# Displays which folders would be deleted and the amount of space that could be reclaimed

killdeps --only-locked .
# If a lock file exists along with composer.json or package.json file, delete the associated package folder.

killdeps --only-locked --dry-run .
# Show locked package folders and reclaimable space

php killdeps
# Run directly with php interpreter

Contributing

We welcome contributions, issues, and feature requests! Feel free to check the issues page.

License

This project is licensed under the MIT License © Burak Boz

To Do:

  • Implement fast scan and delete for vendor & node_modules folders.
  • Implement dry-run feature to simulate deletion.
  • Improve logging and output information.
  • Add unit tests for core functionality.
  • Update documentation and examples.

Contact

For any questions or suggestions to improve killdeps, please feel free to contact me at killdeps@burakboz.net.

burakboz/killdeps 适用场景与选型建议

burakboz/killdeps 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 07 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 burakboz/killdeps 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 burakboz/killdeps 我们能提供哪些服务?
定制开发 / 二次开发

基于 burakboz/killdeps 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 14
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-07-25