Giter VIP home page Giter VIP logo

composer-ignore-plugin's Introduction

Composer Ignore Plugin version Download

This plugin help us to remove the unused file or directories in vendor.

Installation

Both global or local install can work well.

1.Install globally, so every project can use the plugin.

$ composer global require "light/composer-ignore-plugin:~1.0"

2.Install locally

$ composer require "light/composer-ignore-plugin:~1.0" --dev

Usage

Define the ignore file or directory in composer.json, for example:

Before:

fzaninotto/faker/
├── CHANGELOG.md
├── composer.json
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── phpunit.xml.dist
├── readme.md
├── src
└── test

Configuration in composer.json:

{
	"extra": {
		"light-ignore-plugin": {
    	  "fzaninotto/faker": [
    	  	"test", 
    	  	"*.md", 
    	  	"LICENSE",
    	  	"Makefile",
    	  	"phpunit.xml.dist"
    	  ]
    	}
	}
}

After executed composer install, composer update, composer dump-autoload, The files will be removed.

When execute the composer install or composer update will finally trigger the autoload dump event

After:

fzaninotto/faker/
├── composer.json
└── src

Why this?

Thanks to open source, there are many useful packages helped us.

Generally, some files or folder in the installed package is useless, and when deploy to production system, reduce the files can make deploy clean.

Of cause, a lot of package had done this by add .gitattributes file, But also not all, fzaninotto/faker for example.

LICENSE

MIT

composer-ignore-plugin's People

Contributors

lichunqiang avatar

Watchers

James Cloos avatar Zadkiel AHARONIAN avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.