Skip to content

Commit

Permalink
docs: Add examples for the new option '-b'
Browse files Browse the repository at this point in the history
  • Loading branch information
MontealegreLuis committed Jan 30, 2018
1 parent ec7d454 commit 8d387d3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
13 changes: 13 additions & 0 deletions docs/class-diagram.md
Expand Up @@ -18,6 +18,7 @@ It has the following options:
* `hide-protected` (`-o`). If present it will exclude protected methods and attributes
* `hide-attributes` (`-t`). If present it will exclude all the attributes
* `hide-methods` (`-m`). If present it will exclude all the methods
* `hide-empty-blocks` (`-b`). If present, no empty blocks will be shown

## Examples

Expand All @@ -43,6 +44,18 @@ $ vendor/bin/phuml phuml:diagram -r -a -i -o -p dot tests/resources/.code exampl
$ vendor/bin/phuml phuml:diagram -r -t -m -p dot tests/resources/.code example.png
```

* The following command will produce a class diagram from the `tests/resources/.code` directory.
* The diagram will be saved to the file `example.png` in the current directory.
* It will search for classes and interfaces recursively, because of the `-r` option.
* It will use the `dot` command to generate the diagram, because of the `-p dot` option.
* It will only show names because both options `-t` and `-m` are present.
* Option `-a` is not present since there's not attributes or constructors to look for associations.
* It will not create rows for methods and attributes because of the `-b` option.

```
$ vendor/bin/phuml phuml:diagram -r -t -m -b -p dot tests/resources/.code example.png
```

* The following command will produce a class diagram from the `tests/resources/.code` directory.
* The diagram will be saved to the file `example.png` in the current directory.
* It **WILL NOT** search for classes and interfaces recursively, because of the lack of the `-r` option.
Expand Down
14 changes: 13 additions & 1 deletion docs/dot-file.md
Expand Up @@ -31,6 +31,7 @@ It has the following options:
* `hide-protected` (`-o`). If present it will exclude protected methods and attributes
* `hide-attributes` (`-t`). If present it will exclude all the attributes
* `hide-methods` (`-m`). If present it will exclude all the methods
* `hide-empty-blocks` (`-b`). If present, no empty blocks will be generated

## Examples

Expand All @@ -51,7 +52,18 @@ $ vendor/bin/phuml phuml:dot -r -a -i -o tests/resources/.code example.gv
* Option `-a` is not present since there's not attributes or constructors to look for associations.

```
$ vendor/bin/phuml phuml:dot -r -t -m tests/resources/.code example.png
$ vendor/bin/phuml phuml:dot -r -t -m tests/resources/.code example.gv
```

* The following command will produce a DOT file from the `tests/resources/.code` directory.
* The diagram will be saved to the file `example.gv` in the current directory.
* It will search for classes and interfaces recursively, because of the `-r` option.
* It will only show names because both options `-t` and `-m` are present.
* Option `-a` is not present since there's not attributes or constructors to look for associations.
* It will not create rows for methods and attributes because of the `-b` option.

```
$ vendor/bin/phuml phuml:diagram -r -t -m -b tests/resources/.code example.gv
```

* The following command will produce a DOT file from the `tests/resources/.code` directory.
Expand Down

0 comments on commit 8d387d3

Please sign in to comment.