From 3570998391f7c4c9e15471b3f252651c407c8882 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Fri, 30 May 2014 09:48:14 -0400 Subject: [PATCH] update README --- README.md | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8d5d82a..7ef851a 100644 --- a/README.md +++ b/README.md @@ -14,20 +14,42 @@ npm install -g tend ``` Usage: tend + tend + tend [--restart] [--start] [--ignoreHidden] [--filter ] [ ] tend (--help | --version) - tend [--restart] [--ignoreHidden] [ ] [] Options: - -h --help Show this help text - -v --version Show tend version information - -r --restart If is still running when there is a change, stop and re-run it - -i --ignoreHidden Ignore changes to files which start with "." + -h --help Show this help text + -v --version Show tend version information + -r --restart If is still running when there is a change, stop and re-run it + -i --ignoreHidden Ignore changes to files which start with "." + -f --filter Use regular expression to filter which files trigger the command + -s --start Run as soon as tend executes ``` ```bash tend --restart --ignoreHidden ./ "node server.js" ``` +### Options + +#### tend + +Running `tend` with no cli arguments will try to load your `.tendrc` file and start from any configuration set in that + +#### tend + +`tend` will try to load your `.tendrc` file and run the command provided in the section ``. It will run the command +once and will not watch for changes in `directory`. + +#### tend [--restart] [--start] [--ignoreHidden] [--filter ] [ ] + +Run `tend` with options for a single directory/command from cli rather than loading options from `.tendrc`. + +#### tend (--help | --version) + +Show help/version information about `tend` + ### .tendrc `tend` can accept it's configuration from a `.tendrc` file rather than taking arguments from @@ -47,6 +69,7 @@ command=uglifyjs -o ./build/main.min.js ./src/*.js directory=./app command=node ./app/server.js restart=true +start=true ``` The above config will run two instances of `tend`: @@ -56,6 +79,14 @@ tend --ignoreHidden ./src "uglifyjs -o ./build/main.min.js ./src/*.js" tend --ignoreHidden --restart ./app "node ./app/server.js" ``` +#### .tendrc Options +* `ignoreHidden` - ignore hidden folders +* `restart` - restart `command` if a file changes while the previous is still running +* `start` - start `command` when `tend` starts +* `directory` - the directory to watch for changes +* `filter` - regular expression filter for filenames which will trigger `command` +* `command` - the command to run when a file has changed + ## License ``` The MIT License (MIT) Copyright (c) 2014 Brett Langdon (http://brett.is)