2017 © Pedro Peláez
 

library assetwatcher

AssetWatcher will watch and take actions on the files of your project when they are modified

image

leroy-merlin-br/assetwatcher

AssetWatcher will watch and take actions on the files of your project when they are modified

  • Thursday, July 17, 2014
  • by gmsantos
  • Repository
  • 17 Watchers
  • 9 Stars
  • 3,274 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

AssetWatcher (Laravel Package)

Trigger specific commands when specified files are modified. I.E.: You can easly configure an asset pipeline (compilation, concatenation, minification), run tests, etc., (*1)

Quick start

Required setup

In the require key of composer.json file add the following, (*2)

"leroy-merlin-br/assetwatcher": "dev-master"

Run the Composer update comand, (*3)

$ composer update

In your config/app.php add 'LeroyMerlin\AssetWatcher\AssetWatcherServiceProvider' to the end of the $providers array, (*4)

'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'LeroyMerlin\AssetWatcher\AssetWatcherServiceProvider',

),

Publish the AssetWatcher configuration file:, (*5)

php artisan config:publish leroy-merlin-br/assetwatcher

Edit the configuration file app/config/packages/leroy-merlin-br/assetwatcher/config.php adding the behavior you want., (*6)

Examples of use

LESS compilation

First, you need the LESS compiler installed:, (*7)

$ sudo npm install less

Then, in order to compile the app/assets/less/main.less file if any LESS file within assets/less has been modified. The config file should be like:, (*8)

    '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');
        },

License

AssetWatcher is free software distributed under the terms of the MIT license, (*9)

Aditional information

Any issues, please report here, (*10)

The Versions

17/07 2014

dev-master

9999999-dev

AssetWatcher will watch and take actions on the files of your project when they are modified

  Sources   Download

MIT

The Requires

 

by Guilherme Guitte

17/07 2014

1.0.0-beta.1

1.0.0.0-beta1

AssetWatcher will watch and take actions on the files of your project when they are modified

  Sources   Download

MIT

The Requires

 

by Guilherme Guitte