承接 enygma/composerclean 相关项目开发

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

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

enygma/composerclean

最新稳定版本:0.1

Composer 安装命令:

composer require enygma/composerclean

包简介

An additional command for Composer that removes configured files/directory

README 文档

README

With Composer being used often to build a package to deploy, it makes sense that there should be functionality to strip out certain things (like README or a tests/ directory) that don't need to be deployed. With this addition you'll be given a command to "clean" the packages in your repositories and make it ready for deploy.

Usage

To use the package, you'll need two things. First, on your application you need to make the "clean" command available. First, install the latest version of the ComposerClean package:

composer require enygma/composerclean

Then you update your composer.json file to make it a command:

{
	"scripts": {
		"clean": "ComposerClean\\Clean::exec"
	}
}

Then you can fire off the cleaning process with a call to:

composer.phar clean

This will go through your installed repositories and remove the items marked in the project's "clean" list. To define this list in your own project, you put the list of directories or files in the composer.json configuration in the extras section:

{
	"extras": {
		"clean": [
			"tests/",
			"README.md",
			"LICENSE"
		]
	}
}

The command will do its best to remove the files and directories (recursing down) you've specified. The paths start from the root of the project so tests/ would relate to something like vendor/enygma/composerclean/tests and everything under it.

统计信息

  • 总下载量: 1.83k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 18
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 17
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-23