PHP code example of leroy-merlin-br / assetwatcher

1. Go to this page and download the library: Download leroy-merlin-br/assetwatcher 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/ */

    

leroy-merlin-br / assetwatcher example snippets


    'files_to_watch' => array(

        'assets/less/*.less' => function($file) {
            // Using node.js less compiler
            echo "A LESS file has been modified! Compiling 'main.less'.\n";
            exec('lessc app/assets/less/main.less > public/assets/css/main.css');
        },