0.0.6 • Published 11 years ago
wpipe v0.0.6
wpipe
Pipe the contents of one file into a command and write the result to another file, and do this every time the input file changes. Kind of like an extremely simple CLI for watchbuild.
Installation
$ npm install -g wpipeUsage
wpipe <in> <out> <cmd>Where <in> is a glob pattern or file path of the file to watch, <out> is the output file, and <cmd> is the command that is used to transform file contents.
Basically, all that wpipe does is execute something like this:
$ cat <in> | <cmd> > <out> # except you replace <in>, <out> & <cmd>
# with actual file namesEvery time <in> changes.
API
wpipe(infile, outfile, cmd)
Start watching infile and transform its contents by piping them into cmd and write the result to outfile.
License
MIT License. See ./LICENSE for details.