vaneves / tosko
v0.0.4
2020-05-27 14:30 UTC
Requires
- php: >=7.1
- league/pipeline: ^1.0
This package is auto-updated.
Last update: 2024-12-27 23:56:20 UTC
README
PHP class package for League\Pipeline to do frontend tasks.
Install
Composer:
composer require vaneves/tosko
Usage
<?php use Vaneves\Tosko\Pipeline; use Vaneves\Tosko\Src; use Vaneves\Tosko\Dist; use Vaneves\Tosko\Concat; $js = (new Pipeline) ->pipe(new Concat('all.js')) ->pipe(new Dist('assets/')); $js->process(new Src([ 'path/to/lib/jquery.js', 'path/to/lib/bootstrap.js', 'path/to/my/*/*.js', 'my-script.js', ])); $css = (new Pipeline) ->pipe(new Concat('all.css')) ->pipe(new Dist('assets/')); $css->process(new Src([ 'path/to/lib/bootstrap.css', 'my-style.css', ])); // To just copy files, don't use Concat $font = (new Pipeline) ->pipe(new Dist('assets/fonts')); $font->process(new Src([ 'path/to/fonts/*', ]));