Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tfiers authored Dec 9, 2022
1 parent 885d65c commit 719b430
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
# PkgGraph.jl   [![](https://img.shields.io/badge/📕_Documentation-blue)][docs]
# PkgGraph.jl   [![][docbadge]][docs]

<!-- The following part of this ReadMe will be re-used in the docs homepage (for DRY purposes) -->
<!-- for-inclusion-in-docs: -->

Visualize the dependency graph of a Julia package.
Tiny tool to visualize the dependency graphs of Julia packages.

## Example
### Example

```julia
julia> using PkgGraph

julia> PkgGraph.open("Unitful")
julia> PkgGraph.open(:Unitful)
```
This will open the browser to [this url][dotlink], which renders the following image:

`{image, with sans-serif}`
<!-- also add dotlink, below -->

<sub>The given package (here: [Unitful][unitful]) must be installed in the currently active project for this to work.\
Note that `PkgGraph` does not have to be installed in the same project:
Note that `PkgGraph` does not have to be installed in the same project however:
you can switch projects _after_ `PkgGraph` has been imported (using `] activate`).\
Also see [Installation](#installation) for an even easier way, without having to switch projects.
Also see [Installation](#-installation) for an even easier way, without having to switch projects.
</sub>

[dotlink]:
[unitful]: https://github.com/PainterQubits/Unitful.jl


## Local rendering
## 💻 Local rendering

If you are offline and have [Graphviz `dot`](https://graphviz.org) installed on your PATH, you can use
```julia
julia> PkgGraph.create("Unitful", dir=".", fmt=:svg)
```
This will create an image with `dot`, save it to the current directory, and open it with your default image viewer.
This will create an SVG image with `dot`, save it to the current directory, and open it with your default image viewer.

If the directory is not specified, a `tempdir()` is used.


## Installation
## 📦 Installation

You might want to install `PkgGraph` in your base environment (e.g. `v1.8`).
You can then use it in any project, without having to install it in that project.
Expand All @@ -47,32 +47,31 @@ One way to do this (from any environment):
```
julia> using PkgGraph
```
If the package is not found, Julia will offer to install it.

If the package is not found, Julia will offer to install it.\
**Type `o`** and choose your base environment.

You can then call `using PkgGraph` from anywhere, without having to activate the base env.

<!-- /for-inclusion-in-docs -->


## More
## 🔧 More

See the [documentation][docs] for more.
See the [![][docbadge]][docs] for more info.

There are some utility functions (used by the above high-level commands)
which you might find useful if you want to customize this package's functionality.
that you might find useful if you want to customize this package's functionality.

[docbadge]: https://img.shields.io/badge/📕_Documentation-blue
[docs]: https://tfiers.github.io/PkgGraph.jl/


<br>

---

## For contributors
## 👩‍💻 For contributors

Does the latest commit on main ("dev", unstable) pass all tests, and do the dev docs build succesfully?
Does the latest commit on main ("dev", unstable) pass all tests, and do the dev docs build succesfully? Answer:

[![Build Status][CI-badge]][CI-link]

Expand Down

0 comments on commit 719b430

Please sign in to comment.