2017 © Pedro Peláez
 

library filesystemoperations

Add filesystem operations on Composer events

image

markei/filesystemoperations

Add filesystem operations on Composer events

  • Monday, March 12, 2018
  • by markei
  • Repository
  • 1 Watchers
  • 0 Stars
  • 373 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

Markei FileSystemOperations

Add "Markei\FileSystemOperations\Composer::run" to a script section., (*1)

In the extra section add an array with the operations. Each operation is an array, the first item is the method of a Symfony Filesystem class, the next items are used as parameters., (*2)

Example: Setup WordPress core, themes and plugins via composer., (*3)

{
    "name": "my-company/my-wordpress-site",
    "autoload": {
        "psr-4": { "": "src/" }
    },
    "repositories": [
        {
            "type":"composer",
            "url":"https://wpackagist.org"
        }
    ],
    "require": {
        "johnpbloch/wordpress": "4.6.1",
        "wpackagist-plugin/debug-bar" : "~0.8",
        "markei/filesystemoperations" : "dev-default",
    },
    "scripts": {
        "post-install-cmd": ["@wordpress-install"],
        "post-update-cmd": ["@wordpress-install"],
        "wordpress-install": ["Markei\\FileSystemOperations\\Composer::run"]
    },
    "extra": {
        "wordpress-install-dir": "vendor/johnpbloch/wordpress",
        "installer-paths": {
            "wwwroot/wordpress/wp-content/plugins/{$name}": ["type:wordpress-plugin"],
            "wwwroot/wordpress/wp-content/themes/{$name}": ["type:wordpress-theme"]
        },
        "markei-filesystemoperations": [
            ["mkdir", "wwwroot/wordpress"],
            ["mirror", "vendor/johnpbloch/wordpress/wp-admin", "wwwroot/wordpress/wp-admin", null, {"delete": true}],
            ["mirror", "vendor/johnpbloch/wordpress/wp-includes", "wwwroot/wordpress/wp-includes", null, {"delete": true}],
            ["copy", "vendor/johnpbloch/wordpress/index.php", "wwwroot/wordpress/index.php", true],
            ["copy", "vendor/johnpbloch/wordpress/wp-activate.php", "wwwroot/wordpress/wp-activate.php", true],
            ["copy", "vendor/johnpbloch/wordpress/wp-blog-header.php", "wwwroot/wordpress/wp-blog-header.php", true],
            ["copy", "vendor/johnpbloch/wordpress/wp-comments-post.php", "wwwroot/wordpress/wp-comments-post.php", true],
            ["copy", "vendor/johnpbloch/wordpress/wp-cron.php", "wwwroot/wordpress/wp-cron.php", true],
            ["copy", "vendor/johnpbloch/wordpress/wp-links-opml.php", "wwwroot/wordpress/wp-links-opml.php", true],
            ["copy", "vendor/johnpbloch/wordpress/wp-load.php", "wwwroot/wordpress/wp-load.php", true],
            ["copy", "vendor/johnpbloch/wordpress/wp-login.php", "wwwroot/wordpress/wp-login.php", true],
            ["copy", "vendor/johnpbloch/wordpress/wp-mail.php", "wwwroot/wordpress/wp-mail.php", true],
            ["copy", "vendor/johnpbloch/wordpress/wp-settings.php", "wwwroot/wordpress/wp-settings.php", true],
            ["copy", "vendor/johnpbloch/wordpress/wp-signup.php", "wwwroot/wordpress/wp-signup.php", true],
            ["copy", "vendor/johnpbloch/wordpress/wp-trackback.php", "wwwroot/wordpress/wp-trackback.php", true],
            ["copy", "vendor/johnpbloch/wordpress/xmlrpc.php", "wwwroot/wordpress/xmlrpc.php", true],
            ["copy", "vendor/johnpbloch/wordpress/license.txt", "wwwroot/wordpress/license.txt", true]
        ]
    }
}

The Versions

12/03 2018

dev-master

9999999-dev

Add filesystem operations on Composer events

  Sources   Download

MIT

The Requires

 

12/03 2018

v1.1.0

1.1.0.0

Add filesystem operations on Composer events

  Sources   Download

MIT

The Requires

 

18/10 2016

v1.0.0

1.0.0.0

Add filesystem operations on Composer events

  Sources   Download

MIT

The Requires