Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gabrieljmj/junty-minify
[Junty plugin] :ant: Minify CSS and JS files
https://github.com/gabrieljmj/junty-minify
Last synced: about 2 months ago
JSON representation
[Junty plugin] :ant: Minify CSS and JS files
- Host: GitHub
- URL: https://github.com/gabrieljmj/junty-minify
- Owner: gabrieljmj
- License: other
- Created: 2016-03-08T22:31:54.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-19T22:27:37.000Z (almost 9 years ago)
- Last Synced: 2024-05-09T16:12:58.215Z (8 months ago)
- Language: PHP
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
junty-minify
============
Junty plugin for CSS and JS minification.## Installation
```bash
$ composer require --dev gabrieljmj/junty-minify
```## Usage
It is simple to use:
```php
use Gabrieljmj\JuntyMinify\{Css as CssMinifier, Js as JsMinifier};// CSS
$junty->task('css_minify', function () {
$this->src('./public/css/*.css')
->forStreams(new CssMinifier())
->forStreams($this->toDir('public/dist/css'));
});// JS
$junty->task('js_minify', function () {
$this->src('./public/js/*.js')
->forStreams(new JsMinifier())
->forStreams($this->toDir('public/dist/js'));
});
```