2017 © Pedro Peláez
 

library composer-copy-file

Composer script copying your files after install

image

slowprog/composer-copy-file

Composer script copying your files after install

  • Thursday, December 7, 2017
  • by SlowProg
  • Repository
  • 3 Watchers
  • 16 Stars
  • 35,089 Installations
  • PHP
  • 11 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 5 Versions
  • 30 % Grown

The README.md

Composer copy file

Composer script copying your files after install. Supports copying of entire directories, individual files and complex nested directories., (*1)

For example copy fonts:, (*2)

{
    "require":{
        "twbs/bootstrap": "~3.3",
        "slowprog/composer-copy-file": "~0.2"
    },
    "scripts": {
        "post-install-cmd": [
            "SlowProg\\CopyFile\\ScriptHandler::copy"
        ],
        "post-update-cmd": [
            "SlowProg\\CopyFile\\ScriptHandler::copy"
        ]
    },
    "extra": {
        "copy-file": {
            "vendor/twbs/bootstrap/fonts/": "web/fonts/"
        }
    }
}

Use cases

You need to be careful when using a last slash. The file-destination is different from the directory-destination with the slash., (*3)

Source directory hierarchy:, (*4)

dir/
    subdir/
        file1.txt
        file2.txt
  1. Dir-to-dir:, (*5)

    {
        "extra": {
            "copy-file": {
                "dir/subdir/": "web/other/"
            }
        }
    }
    

    Result:, (*6)

    web/
        other/
            file1.txt
            file2.txt
    
  2. File-to-dir:, (*7)

    {
        "extra": {
            "copy-file": {
                "dir/subdir/file1.txt": "web/other/"
                "dir/subdir/file2.txt": "web/other/file2.txt/"
            }
        }
    }
    

    Result:, (*8)

    web/
        other/
            file1.txt
            file2.txt/
                file2.txt
    
  3. File-to-file:, (*9)

    {
        "extra": {
            "copy-file": {
                "dir/subdir/file1.txt": "web/other/file1.txt"
                "dir/subdir/file2.txt": "web/other/file_rename.txt"
            }
        }
    }
    

    Result:, (*10)

    web/
        other/
            file1.txt
            file_rename.txt
    

The Versions

07/12 2017

dev-master

9999999-dev https://github.com/SlowProg/composer-copy-file

Composer script copying your files after install

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Andrey Tyshev

copy file

07/12 2017

0.2.1

0.2.1.0 https://github.com/SlowProg/composer-copy-file

Composer script copying your files after install

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Andrey Tyshev

copy file

26/03 2017

0.2.0

0.2.0.0 https://github.com/SlowProg/composer-copy-file

Composer script copying your files after install

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Andrey Tyshev

copy file

03/03 2017

0.1.3

0.1.3.0 https://github.com/SlowProg/composer-copy-file

Composer script copying your files after install

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Andrey Tyshev

copy file

25/09 2016

0.1.2

0.1.2.0 https://github.com/SlowProg/composer-copy-file

Composer script copying your files after install

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Andrey Tyshev

copy file