Skip to content

Commit

Permalink
docs: Add PHIVE installation/usage instructions
Browse files Browse the repository at this point in the history
- Add PHIVE commands to install phUML
- Update examples to also use PHIVE
  • Loading branch information
MontealegreLuis committed Aug 30, 2021
1 parent 3482e13 commit 3e2b353
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 9 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ It creates a class diagram from an Object-Oriented codebase based on the UML spe

## Installation

## Phive

phUML can be installed by [Phive](https://phar.io/) - The PHAR Installation and Verification Environment.

```
phive install phuml
```

Phive will generate a `.phive` and a `tools` directory which you may want to add to your `.gitignore` file.

### Docker

The official phUML Docker image can be found on [Docker Hub](https://hub.docker.com/r/montealegreluis/phuml/).
Expand All @@ -22,18 +32,18 @@ docker pull montealegreluis/phuml:5.2.0

You can replace `5.2.0` with any of the available [tags](https://hub.docker.com/r/montealegreluis/phuml/tags?page=1&ordering=last_updated)

### Composer
## Composer

Alternatively, you may use [Composer][composer] to download and install phUML as well as its dependencies.
phUML can be installed globally by [Composer](https://getcomposer.org/).

```bash
composer require phuml/phuml
composer global require phuml/phuml
```

phUML can also be installed globally.
Alternatively, you may want to install phUML as well as its dependencies.

```bash
composer global require phuml/phuml
composer require phuml/phuml
```

## How does it look like?
Expand Down
10 changes: 10 additions & 0 deletions docs/class-diagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ It has the following options:
vendor/bin/phuml phuml:diagram -r -a -i -o -p dot src example.png
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:diagram -r -a -i -o -p dot src example.png
# Phive installation
tools/phuml phuml:diagram -r -a -i -o -p dot src example.png
```

* The following command will produce a class diagram from the `src` directory.
Expand All @@ -54,6 +56,8 @@ docker run --rm -v $PWD:/code montealegreluis/phuml phuml:diagram -r -a -i -o -p
vendor/bin/phuml phuml:diagram -r -t -m -p dot src example.png
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:diagram -r -t -m -p dot src example.png
# Phive installation
tools/phuml phuml:diagram -r -t -m -p dot src example.png
```

* The following command will produce a class diagram from the `src` directory.
Expand All @@ -69,6 +73,8 @@ docker run --rm -v $PWD:/code montealegreluis/phuml phuml:diagram -r -t -m -p do
vendor/bin/phuml phuml:diagram -r -t -m -b -p dot src example.png
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:diagram -r -t -m -b -p dot src example.png
# Phive installation
tools/phuml phuml:diagram -r -t -m -b -p dot src example.png
```

* The following command will produce a class diagram from the `src` directory.
Expand All @@ -83,6 +89,8 @@ docker run --rm -v $PWD:/code montealegreluis/phuml phuml:diagram -r -t -m -b -p
vendor/bin/phuml phuml:diagram -p neato src example.png
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:diagram -p neato src example.png
# Phive installation
tools/phuml phuml:diagram -p neato src example.png
```

* The following command will produce a class diagram from the `src` directory.
Expand All @@ -98,4 +106,6 @@ docker run --rm -v $PWD:/code montealegreluis/phuml phuml:diagram -p neato src e
vendor/bin/phuml phuml:diagram -p dot -e php src example.png
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:diagram -p dot -e php src example.png
# Phive installation
tools/phuml phuml:diagram -p dot -e php src example.png
```
10 changes: 10 additions & 0 deletions docs/dot-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ It has the following options:
vendor/bin/phuml phuml:dot -r -a -i -o src example.gv
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:dot -r -a -i -o src example.gv
# Phive installation
tools/phuml phuml:dot -r -a -i -o src example.gv
```

* The following command will produce a DOT file from the `src` directory.
Expand All @@ -65,6 +67,8 @@ docker run --rm -v $PWD:/code montealegreluis/phuml phuml:dot -r -a -i -o src ex
vendor/bin/phuml phuml:dot -r -t -m src example.gv
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:dot -r -t -m src example.gv
# Phive installation
tools/phuml phuml:dot -r -t -m src example.gv
```

* The following command will produce a DOT file from the `src` directory.
Expand All @@ -79,6 +83,8 @@ docker run --rm -v $PWD:/code montealegreluis/phuml phuml:dot -r -t -m src examp
vendor/bin/phuml phuml:diagram -r -t -m -b src example.gv
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:diagram -r -t -m -b src example.gv
# Phive installation
tools/phuml phuml:diagram -r -t -m -b src example.gv
```

* The following command will produce a DOT file from the `src` directory.
Expand All @@ -92,6 +98,8 @@ docker run --rm -v $PWD:/code montealegreluis/phuml phuml:diagram -r -t -m -b sr
vendor/bin/phuml phuml:dot src example.gv
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:dot src example.gv
# Phive installation
tools/phuml phuml:dot src example.gv
```

* The following command will produce a DOT file from the `src` directory.
Expand All @@ -106,6 +114,8 @@ docker run --rm -v $PWD:/code montealegreluis/phuml phuml:dot src example.gv
vendor/bin/phuml phuml:dot -e php src example.gv
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:dot -e php src example.gv
# Phive installation
tools/phuml phuml:dot -e php src example.gv
```

[dot]: https://en.wikipedia.org/wiki/DOT_(graph_description_language)
18 changes: 14 additions & 4 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ currentMenu: installation

# Installation

## Phive

phUML can be installed by [Phive](https://phar.io/) - The PHAR Installation and Verification Environment.

```
phive install phuml
```

Phive will generate a `.phive` and a `tools` directory which you may want to add to your `.gitignore` file.

## Docker

The official phUML Docker image can be found on [Docker Hub](https://hub.docker.com/r/montealegreluis/phuml/).
Expand All @@ -16,14 +26,14 @@ You can replace `5.2.0` with any of th available [tags](https://hub.docker.com/r

## Composer

Alternatively, you may use [Composer](https://getcomposer.org/) to download and install phUML as well as its dependencies.
phUML can be installed globally by [Composer](https://getcomposer.org/).

```bash
composer require phuml/phuml
composer global require phuml/phuml
```

phUML can also be installed globally.
Alternatively, you may want to install phUML as well as its dependencies.

```bash
composer global require phuml/phuml
composer require phuml/phuml
```
4 changes: 4 additions & 0 deletions docs/statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ It has the following options:
vendor/bin/phuml phuml:statistics -r src example.txt
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:statistics -r src example.txt
# Phive installation
tools/phuml phuml:statistics -r src example.txt
```

* The following command will produce a statistics file from the `src` directory.
Expand All @@ -37,4 +39,6 @@ docker run --rm -v $PWD:/code montealegreluis/phuml phuml:statistics -r src exam
vendor/bin/phuml phuml:statistics src example.txt
# Docker installation
docker run --rm -v $PWD:/code montealegreluis/phuml phuml:statistics src example.txt
# Phive installation
tools/phuml phuml:statistics src example.txt
```

0 comments on commit 3e2b353

Please sign in to comment.