weevers/pulp
最新稳定版本:v0.0.2
Composer 安装命令:
composer require weevers/pulp
包简介
A streaming build system like gulp
README 文档
README
pulp is a streaming build system, something like gulp for PHP. Meaning: with src("*.css") you get a asynchronous duplex stream that emits virtual file objects. This stream can then be piped to one or more plugins or to a filesystem destination with dest("target-dir"). pulp is a weekend experiment, please use a VM if you want to play with it. Requires PHP 5.4+.
example
This example bundles all the javascript files in "assets" and its subdirectories, then writes it to "build/all.js".
<?php use Weevers\Pulp\Pulp , Weevers\Pulp\Plugin; $pulp = new Pulp(); $pulp ->src('assets/**/*.js') ->pipe(new Plugin\Concat('all.js')) ->pipe($pulp->dest('build')) ->each(function($file){ echo "bundled all js in {$file->path}\n"; }) ; // Nothing happens until we start an event loop $pulp->run(); ?>
If we leave out the Concat plugin, all javascript files are copied. Note that a file like "assets/js/app.js" would be copied to "build/js/app.js".
<?php $pulp ->src('assets/**/*.js') ->pipe($pulp->dest('build')); $pulp->run(); ?>
install
With composer do:
composer require weevers/pulp
license
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-31