2017 © Pedro Peláez
 

library composer-scripts

Composer scripts

image

jlaso/composer-scripts

Composer scripts

  • Saturday, December 3, 2016
  • by jlaso
  • Repository
  • 1 Watchers
  • 0 Stars
  • 38 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

composer-scripts

Composer Scripts is a way to automatize task when composer finish updating or installing., (*1)

Let's see an example:, (*2)

We want to install a theme in the vendor forlder but use it in a source Bundle., (*3)

We just have to create a yml file with this structure, (*4)

# app/config/composer-scripts.yml
scripts:
    copy:
        -
            source: vendor/gurayyarar/AdminBSBMaterialDesign/css
            dest: src/Acme/AdminBundle/Resources/public/css
            method: ln
        -
            source: vendor/gurayyarar/AdminBSBMaterialDesign/images
            dest: src/Acme/AdminBundle/Resources/public/images
            method: ln
        -
            source: vendor/gurayyarar/AdminBSBMaterialDesign/js
            dest: src/Acme/AdminBundle/Resources/public/js
            method: ln
        -
            source: vendor/gurayyarar/AdminBSBMaterialDesign/plugins
            dest: src/Acme/AdminBundle/Resources/public/plugins
            method: ln

And declare in the composer.json file the next:, (*5)

{
    ...
    "require-dev": {
        ...
        "jlaso/composer-scripts": "1.0",
        ...
    },
    "scripts": {
        "post-install-cmd": [
            ...
            "JLaso\\ComposerScripts\\Runner::execute"
        ],
        "post-update-cmd": [
            ...
            "JLaso\\ComposerScripts\\Runner::execute"
        ]
    },
    ...
    "extra": {
        ...
        "jlaso-composer-scripts": "app/config/composer-scripts.yml",
        ...
    }
}

when you launch composer install or composer update at the end of the process composer-scripts will create symbolink links for the folders declared., (*6)

The Versions

03/12 2016

dev-master

9999999-dev https://github.com/jlaso/composer-scripts

Composer scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

composer automatize script

03/12 2016

1.0.2

1.0.2.0 https://github.com/jlaso/composer-scripts

Composer scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

composer automatize script

20/09 2016

1.0.1

1.0.1.0 https://github.com/jlaso/composer-scripts

Composer scripts

  Sources   Download

MIT

The Requires

 

The Development Requires

composer automatize script