PHP code example of weevers / pulp
1. Go to this page and download the library: Download weevers/pulp library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
weevers / pulp example snippets
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();
$pulp
->src('assets/**/*.js')
->pipe($pulp->dest('build'));
$pulp->run();