task / archive
Archive plugin for Task using Zippy
v0.3.0
2014-05-04 14:24 UTC
Requires
- task/filesystem: ~0.1
- task/plugin: ~1.1
Requires (Dev)
- satooshi/php-coveralls: ~0.6
- task/phpunit: ~0.1
- task/task: ~0.1
This package is not auto-updated.
Last update: 2024-12-21 17:34:32 UTC
README
Example
use Task\Plugin\FilesystemPlugin; use Task\Plugin\ArchivePlugin; use Task\Plugin\Archive\Archive; $project->inject(function ($container) { $container['fs'] = new FilesystemPlugin; $container['archive'] = new ArchivePlugin; }); $project->addTask('archive', ['fs', 'archive', function ($fs, $archive) { $source = 'path/to/directory'; $target = 'path/to/archive.tar.gz'; $fs->ls($source) ->pipe($archive->create(Archive::TAR, Archive::GZ)) ->pipe($fs->touch($target)); }]);
Installation
Add to your composer.json
:
... "require-dev": { "task/archive": "~0.1" } ...