定制 weevers/pulp 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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+.

packagist status Travis build status AppVeyor build status Dependency status

Jump to: install / license

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

MIT © Vincent Weevers

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-31