commit
e4f8592e17
2 changed files with 15 additions and 32 deletions
35
README.md
35
README.md
|
|
@ -22,8 +22,6 @@
|
||||||
|
|
||||||
- [Quickstart](#quickstart)
|
- [Quickstart](#quickstart)
|
||||||
- [Install](#install)
|
- [Install](#install)
|
||||||
* [Install script](#install-script)
|
|
||||||
* [Install from source](#install-from-source)
|
|
||||||
- [D2 as a library](#d2-as-a-library)
|
- [D2 as a library](#d2-as-a-library)
|
||||||
- [Themes](#themes)
|
- [Themes](#themes)
|
||||||
- [Fonts](#fonts)
|
- [Fonts](#fonts)
|
||||||
|
|
@ -58,47 +56,20 @@ A browser window will open with `out.svg` and live-reload on changes to `in.d2`.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
For detailed installation docs with examples see [./docs/INSTALL.md](./docs/INSTALL.md).
|
The easiest way to install is with our install script:
|
||||||
|
|
||||||
### Install script
|
|
||||||
|
|
||||||
The recommended way to install is to run our install script, which will figure out the
|
|
||||||
best way to install based on your machine.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# With --dry-run the install script will print the commands it will use
|
|
||||||
# to install without actually installing so you know what it's going to do.
|
|
||||||
curl -fsSL https://d2lang.com/install.sh | sh -s -- --dry-run
|
|
||||||
# If things look good, install for real.
|
|
||||||
curl -fsSL https://d2lang.com/install.sh | sh -s --
|
curl -fsSL https://d2lang.com/install.sh | sh -s --
|
||||||
```
|
```
|
||||||
|
|
||||||
We have precompiled binaries on the [releases](https://github.com/terrastruct/d2/releases)
|
|
||||||
page for macOS and Linux. For both amd64 and arm64. We will release package manager
|
|
||||||
distributions like .rpm, .deb soon. D2 is on Homebrew with our tap (the install script
|
|
||||||
uses this automatically if it detects you have `brew`). See
|
|
||||||
[./docs/INSTALL.md](./docs/INSTALL.md).
|
|
||||||
|
|
||||||
Docker image coming soon.
|
|
||||||
|
|
||||||
To uninstall:
|
To uninstall:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://d2lang.com/install.sh | sh -s -- --uninstall --dry-run
|
|
||||||
# If things look good, uninstall for real.
|
|
||||||
curl -fsSL https://d2lang.com/install.sh | sh -s -- --uninstall
|
curl -fsSL https://d2lang.com/install.sh | sh -s -- --uninstall
|
||||||
```
|
```
|
||||||
|
|
||||||
> warn: Our binary releases aren't fully portable like normal Go binaries due to the C
|
For detailed installation docs, with alternative methods and examples for each OS, see
|
||||||
> dependency on v8go for executing dagre.
|
[./docs/INSTALL.md](./docs/INSTALL.md).
|
||||||
|
|
||||||
### Install from source
|
|
||||||
|
|
||||||
Alternatively, you can install from source:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
go install oss.terrastruct.com/d2/cmd/d2@latest
|
|
||||||
```
|
|
||||||
|
|
||||||
## D2 as a library
|
## D2 as a library
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@ This file documents all the ways by which you can install D2.
|
||||||
|
|
||||||
## install.sh
|
## install.sh
|
||||||
|
|
||||||
|
The recommended and easiest way to install is with our install script, which will detect
|
||||||
|
the OS and architecture you're on and use the best method:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# With --dry-run the install script will print the commands it will use
|
# With --dry-run the install script will print the commands it will use
|
||||||
# to install without actually installing so you know what it's going to do.
|
# to install without actually installing so you know what it's going to do.
|
||||||
|
|
@ -69,6 +72,8 @@ The install script places the standalone release into `$PREFIX/lib/d2/d2-<versio
|
||||||
and we recommend doing the same with manually installed releases so that you
|
and we recommend doing the same with manually installed releases so that you
|
||||||
know where the release directory is for easy uninstall.
|
know where the release directory is for easy uninstall.
|
||||||
|
|
||||||
|
> warn: Our binary releases aren't fully portable like normal Go binaries due to the C
|
||||||
|
> dependency on v8go for executing dagre.
|
||||||
|
|
||||||
## From source
|
## From source
|
||||||
|
|
||||||
|
|
@ -77,3 +82,10 @@ Alternatively, you can always install from source:
|
||||||
```sh
|
```sh
|
||||||
go install oss.terrastruct.com/d2/cmd/d2@latest
|
go install oss.terrastruct.com/d2/cmd/d2@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Coming soon
|
||||||
|
|
||||||
|
- Docker image
|
||||||
|
- Windows install
|
||||||
|
- rpm and deb packages
|
||||||
|
- homebrew core
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue