Created
March 9, 2017 17:57
-
-
Save cballou/ce56bc072b49d977691ebb5b3df81155 to your computer and use it in GitHub Desktop.
Watchdog is a PHP library using inotify to watch for file changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
'types' => array('sass', 'scss', 'less', 'styl', 'jade', 'haml'), | |
'watch' => array( | |
'/path/to/public/css', | |
'/path/to/alternate/css' | |
), | |
'minify' => true, | |
'ignore' => array() | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
'types' => array('sass', 'scss', 'less', 'styl', 'jade', 'haml'), | |
'watch' => array( | |
// key => val equivalent to input file for compilation => output file (result of compiling) | |
'/path/to/public/css/dynamic/' => '/path/to/public/css/', | |
// assume the input path and output path are the same | |
'/path/to/alternate/css', | |
// watch a specific file | |
'/path/to/public/html/view.jade' | |
), | |
'minify' => true, | |
'ignore' => array( | |
'mixins.less' | |
) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# watch stylus files contained within /path/to/public/css/ | |
./watchdog --types styl --watch /path/to/public/css/ | |
# watch all supported file types contained within /path/to/public/css/ | |
./watchdog --types styl,sass,scss,less,jade,haml --watch /path/to/public/css/ | |
# watch Stylus and LESS but ignore files matching mixins.less | |
./watchdog --types styl,less --watch /path/to/public/css/ --ignore mixins.less | |
# watch LESS files but ignore files matching mixins.less | |
./watchdog --types less --watch /path/to/public/css/less/ --ignore mixins.less -- | |
# begin watching using a PHP configuration file | |
./watchdog --config /path/to/config.php | |
# display help | |
./watchdog --help |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment