PHP code example of jymusic / assets

1. Go to this page and download the library: Download jymusic/assets 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/ */

    

jymusic / assets example snippets


use JYmusic\Assets\Minify;

//合并压缩js
$options = [
   'files' => [
       '//js/test.js',
       '//js/test2.js',
       '//js/test3.js'
    ]
];
Minify::serve("Files", $options);

//合并压缩css
$options = [
   'files' => [
       '//js/test.css',
       '//js/test2.css',
       '//js/test3.css'
    ]
];
Minify::serve("Files", $options);




JYmusic\Assets\Minify;

Minify::serve("Files", ['files' => ["//js/test.js"]]);

Minify::serve("Files", ['files' => ["//js/test.css"]]);