https://github.com/vaneves/tosko
✅ PHP task pack
https://github.com/vaneves/tosko
php-library pipeline tasks
Last synced: 8 months ago
JSON representation
✅ PHP task pack
- Host: GitHub
- URL: https://github.com/vaneves/tosko
- Owner: vaneves
- License: mit
- Created: 2020-05-26T23:58:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-27T14:31:03.000Z (about 6 years ago)
- Last Synced: 2025-02-27T12:42:20.043Z (over 1 year ago)
- Topics: php-library, pipeline, tasks
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tosko
PHP class package for [League\Pipeline](https://pipeline.thephpleague.com/) to do frontend tasks.
## Install
Composer:
```
composer require vaneves/tosko
```
## Usage
```php
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/*',
]));
```