UNPKG

signal-channel

Version:

A signal channel that empowers webrtc

46 lines (45 loc) 5.91 kB
{ "name": "wr", "description": "watch files and run a command when they change", "author": { "name": "Patrick Mueller" }, "version": "1.2.1", "tags": [ "command", "watch" ], "licenses": [ { "type": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0" } ], "engines": { "node": ">=0.4.0" }, "directories": { "lib": "./lib" }, "dependencies": { "optimist": ">=0.3.0", "charm": ">=0.0.5" }, "devDependencies": { "coffee-script": ">=1.1.3" }, "main": "./lib/command", "bin": { "wr": "./bin/wr" }, "homepage": "https://github.com/pmuellr/wr", "bugs": "https://github.com/pmuellr/wr/issues", "repository": { "type": "git", "url": "git://github.com/pmuellr/wr" }, "readme": "<!--\n# Copyright (c) 2012 Patrick Mueller\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n-->\n\nNAME\n----\n\n`wr` -- watch files and run a command when they change\n\nSYNOPSIS\n--------\n\n wr [-cvV] command [file ...]\n\nDESCRIPTION\n-----------\n\n`wr` will watch the set of files and directories specified on the\ncommand line, and run the specified command when any of the files\nchanges. For each file operand which is a directory, all the files\nin the directory (recursively) will be watched.\n\nIf no files are specified, it's as if you passed \".\" as the file parameter.\n\nThe following options are available:\n\n`-c --chime minutes`\n\n> Write a diagnostic message after `minutes` have elapsed since last running\n> a command, to remind you `wr` is running. The default is 5 minutes.\n> Use the value 0 to disable the chime.\n\n`-v --verbose`\n\n> Generate additional diagnostic information.\n\n`--stdoutcolor color`\n\n`--stderrcolor color`\n\n> Display stdout and stderr in specific colors; color values:\n> `black red green yellow blue magenta cyan white`.\n\n`--exec`\n\n> Use exec instead of spawn to run the command.\n\n`-p --poll seconds`\n\n> Use a polling file watcher. The default is to use a non-polling file watcher.\n> The non-polling file watcher\n> may have a relatively small maximum number of files it can watch (200),\n> but the polling file watcher has no maximum.\n> The polling file\n> watcher may incur delays between a file changing and the command running,\n> compared to the non-polling file watcher.\n\n`-V`\n\n> Display the version number and exit.\n\n`-? -h`\n\n> Display help.\n\nEXAMPLES\n--------\n\nThe following is how to run make when any file in the current directory\nchanges:\n\n wr make\n\nMore likely you can whittle the list of source files checked a bit. The\nfollowing will run make any file in the `src`, `doc` or `test` directories\nchanges:\n\n wr make src doc test\n\nTo run a command with arguments, quote the command you want to run. The\nfollowing will run the command \"`echo a file changed`\" when any file in the\ncurrent directory changes:\n\n wr \"echo a file changed\"\n\nDIAGNOSTICS\n-----------\n\nwr will not normally exit. Use ctrl-c or equivalent to kill the process\nfrom the command-line.\n\nDiagnostic information from `wr` will be written to stderr.\n\nENVIRONMENT\n-----------\n\nIf the current directory has a `.wr` file in it, that file is assumed\nto have the contents of a `wr` invocation in it. Options, option/value\npairs, the command to run, and each file to be watched should be\nspecified on separate lines.\nThe file may contain blank lines or lines starting with the `#` character,\nwhich are considered comments.\n\nThe stdout and stderr from the command being run are passed directory to\n`wr`'s stdout and stderr. stdin for the command will not be available\nfor the command.\n\nThe command will be run in either spawn or exec mode, as determined by\ncommand-line options. Here are the differences:\n\nexec:\n\n* the command will not be parsed, as will be run as given\n* should handle i/o redirection shell operators\n* stdout and stderr output will be buffered until the command is complete\n\nspawn:\n\n* the command will be parsed into space separated tokens, probably\nmisinterpreting any quotes you have in your command\n* will not handle i/o redirection shell operators\n* stdout and stderr output will not be buffered\n\nHISTORY\n-------\n\n`wr` is a port of Patrick Mueller's [run-when-changed.py](https://gist.github.com/240922)\nscript to node.\n\n**2012-05-03: version 1.2.0**\n\n* [issue 8](https://github.com/pmuellr/wr/issues/8) - add elapsed time to success and failure messages\n* fixed bug where wr fired off it's command when the access time changed on a file\n\n**2012-01-11: version 1.1.0**\n\n* [issue 1](https://github.com/pmuellr/wr/issues/1) - chime should print the time\n* [issue 2](https://github.com/pmuellr/wr/issues/2) - chime should default to 5 minutes\n* [issue 3](https://github.com/pmuellr/wr/issues/3) - .wr file parser should accept option/value on a single line\n* [issue 5](https://github.com/pmuellr/wr/issues/5) - provide option to use stat-based polling\n* [issue 6](https://github.com/pmuellr/wr/issues/6) - use spawn instead of exec to run commands\n* [issue 7](https://github.com/pmuellr/wr/issues/7) - colorize stdout and stderr\n\n**2012-01-10: version 1.0.1**\n\n* fixed some stupid bugs\n\n**2012-01-09: version 1.0.0**\n\n* initial release\n\n", "readmeFilename": "README.md", "_id": "wr@1.2.1", "_from": "wr" }