diff --git a/.gitignore b/.gitignore index 2c17fa9..a27436f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules/ +client/pert-ui.js client/bower_components/ test/ lib/ diff --git a/README.md b/README.md index 8f1f389..247b71d 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,10 @@ Make sure you have `node` and `npm` installed and working __From git__ -1. clone this repo and run `build.sh` -2. run `bin/pert` +1. clone this repo +2. run `npm install` in the root of the repo, then run `bower install` in `client/` if you need to use the Web GUI +3. run `npm run-script build` to compile all files +4. the binary should now be in `bin/pert` __From npm__ @@ -18,18 +20,22 @@ __From npm__ ## Usage - Usage: pert loads activity data from JSON and computes the possible activity delays + Usage: pert [options] [args] + + loads activity data from JSON and computes the possible activity delays Commands: example show an example of the JSON data format calculate|c [options] calculate data on given JSON document + graph|g serve HTTP GUI with pert graph of given JSON document Options: -h, --help output usage information -V, --version output the version number - --verbose be verbose (for debugging) + -v, --verbose be verbose (for debugging) + This is the help information for the `pert calculate` command: @@ -44,7 +50,7 @@ This is the help information for the `pert calculate` command: ## Data format -This is a valid input document: +This is a valid input document (extra data is ignored but not thrashed): ```json [ diff --git a/src/pert-cli.coffee b/src/pert-cli.coffee index d9f27fe..98afe3a 100755 --- a/src/pert-cli.coffee +++ b/src/pert-cli.coffee @@ -9,8 +9,9 @@ ex = [{id: 0, depends: [], duration: 2}, { id: 1, depends: [0], duration: 3},{id cli .version '0.1' - .usage 'loads activity data from JSON and computes the possible activity delays' - .option '--verbose', 'be verbose (for debugging)' + .description 'loads activity data from JSON and computes the possible activity delays' + .usage ' [options] [args]' + .option '-v, --verbose', 'be verbose (for debugging)' didSomething = no