2017 © Pedro Peláez
 

library composerclean

An additional command for Composer that removes configured files/directory

image

enygma/composerclean

An additional command for Composer that removes configured files/directory

  • Thursday, January 25, 2018
  • by enygma
  • Repository
  • 4 Watchers
  • 17 Stars
  • 1,586 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

"Clean" command for Composer

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., (*1)

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:, (*2)

composer require enygma/composerclean

Then you update your composer.json file to make it a command:, (*3)

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

Then you can fire off the cleaning process with a call to:, (*4)

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:, (*5)

{
    "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., (*6)

The Versions

25/01 2018

dev-master

9999999-dev https://github.com/enygma/composerclean.git

An additional command for Composer that removes configured files/directory

  Sources   Download

MIT

The Requires

  • php >=5.3.1

 

composer clean deploy

23/05 2015

0.1

0.1.0.0 https://github.com/enygma/composerclean.git

An additional command for Composer that removes configured files/directory

  Sources   Download

MIT

The Requires

  • php >=5.3.1

 

composer clean deploy