farhanwazir/cpcinstaller

Installs: 30

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 1

Open Issues: 0

Type:composer-plugin

v1.0.3 2017-02-07 16:12 UTC

This package is not auto-updated.

Last update: 2024-11-09 20:45:25 UTC


README

Composer Packages Custom Installer is a easy to custom, you don't need any speciality. This will helpful for installation of your packages, modules, plugins, theme(s) and/or whatever you call, in your's given location with many more options.

Boost up your work, FORK it right now!

Add just 2 lines in composer.json, Composer package schema's

    "type": "yourname-packagename",
    "require": {
        "farhanwazir/cpcinstaller" : "1.*"
        .....
    },
    "repositories": [
            {
                "type": "vcs",
                "url": "https://github.com/yourname/cpcinstaller"
            }
        ],

Change instructions for composer.json: In the repositories attribute you need to replace url with your forked url.

If you have forked then go under src/Installer/Config see sample.php configuration file, copy it and add many as you wish. Each attribute has its own functionality so read comments carefully and change it as on your needs. If you don't want optional attributes then remove it.

Configuration File Instruction

  • Configuration file name - here is no restrictions, name it whatever you want.
  • PHP file extension - configuration file extension should be .php.

Configuration attributes

  • type - Package type

    It is belongs to composer.json type attribute. For more detail visit Composer official documentation

    • DataType: String
    • Mandatory attribute
  • location - Installation directory

    It helps you to define where you wanted to install. It must be start from parent directory of vendor directory.

    Instruction: Path should end with trail slash /. Below example only for understanding, other attributes applies.

    • Default: 'vendor'
    • Type: String Path
    • Mandatory attribute

    i.e 'directory1/subdirectory/' hierarchy looks like directory1/subdirectory/vendor/package

  • only Allowed package(s)

    If you want multiple packages for same "type" then use array as value like "only" => ["vendor/package_1", "vendor/package_2"]

    You can also use wild card for packages like "restvel/*" this will allow all packages from vendor "restvel" by matching "type"

    • Default: null
    • Type: String/Array
    • Optional attribute
  • rename Renaming package(s)

    If "rename" will be string then all same "type" and "only" attributes installed under renamed. You can also use wild card, with prefix and/or suffix like "package-*" or "*-package" or "package-*-packages". Above example will be return "package-test" or "test-package" or "package-test-packages".

    If "only" has multiple packages list and you wants each package install under your custom name then it's length must be equals to "only" otherwise last name will be used in case of unordered position.

    Instruction: Empty quotes '' place package files on root of location attribute. Vendor attribute action applies.

    • Default: null
    • Type: String
    • Optional attribute
  • vendor Vendor reference

    If you don't wanted to use vendor reference with package then its value should be false.

    • Default: true
    • Options: true/false
    • Optional attribute

Contribution

If have any suggestion for documentation then improve it and send me pull request.

Thank you for using