Watch for volo
Watch is a volo
command that monitors CSS/JS
files. Upon modification, watch minifies the file that it is monitoring. Usage
is fairly simple. First, ensure you have volo
installed:
$ npm install -g volo
Then, install watch via npm
:
$ npm install -g volo-watch
Now run the volo watch
command with two parameters:
- the input file that should be monitored for changes
- the minified file to output to when the input file changes
For example, the following will watch style.css
in the current working
directory for changes. When style.css
is altered, it will minify it and
output the result to style.min.css
, also in the current working directory.
$ volo watch style.css style.min.css
In like manner, if you needed to monitor a JavaScript file—say, script.js
—
simply use the exact same syntax with modified options:
$ volo watch script.js script.min.js
And that's watch for volo.