From 72b8a48ba42b35680f59e5294008d8b94599d4d1 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 21 Nov 2022 09:31:05 -0800 Subject: [PATCH 1/4] 2022-11-21 09:31:05AM --- README.md | 32 -------------------------------- docs/INSTALL.md | 9 +++++++++ 2 files changed, 9 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 4dc18eb71..7c4ce599c 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,6 @@ - [Quickstart](#quickstart) - [Install](#install) - * [Install script](#install-script) - * [Install from source](#install-from-source) - [D2 as a library](#d2-as-a-library) - [Themes](#themes) - [Fonts](#fonts) @@ -60,46 +58,16 @@ A browser window will open with `out.svg` and live-reload on changes to `in.d2`. For detailed installation docs with examples see [./docs/INSTALL.md](./docs/INSTALL.md). -### 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 -# 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 -- ``` -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: ```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 ``` -> warn: Our binary releases aren't fully portable like normal Go binaries due to the C -> dependency on v8go for executing dagre. - -### Install from source - -Alternatively, you can install from source: - -```sh -go install oss.terrastruct.com/d2/cmd/d2@latest -``` - ## D2 as a library In addition to being a runnable CLI tool, D2 can also be used to produce diagrams from diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 0dda53b17..97af0744a 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -69,6 +69,8 @@ The install script places the standalone release into `$PREFIX/lib/d2/d2- warn: Our binary releases aren't fully portable like normal Go binaries due to the C +> dependency on v8go for executing dagre. ## From source @@ -77,3 +79,10 @@ Alternatively, you can always install from source: ```sh go install oss.terrastruct.com/d2/cmd/d2@latest ``` + +## Coming soon + +- Docker image +- Windows install +- rpm and deb packages +- homebrew core From c5ae5fa6e7daf7463d45955aa5ed6aeae9224421 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 21 Nov 2022 09:32:59 -0800 Subject: [PATCH 2/4] 2022-11-21 09:32:59AM --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c4ce599c..ea86143fa 100644 --- a/README.md +++ b/README.md @@ -56,12 +56,15 @@ A browser window will open with `out.svg` and live-reload on changes to `in.d2`. ## Install -For detailed installation docs with examples see [./docs/INSTALL.md](./docs/INSTALL.md). +The easiest way to install is with our install script: ```sh curl -fsSL https://d2lang.com/install.sh | sh -s -- ``` +For detailed installation docs, with alternative methods and examples for each OS, see +[./docs/INSTALL.md](./docs/INSTALL.md). + To uninstall: ```sh From 2568b6d534cc1ddffae16a0736562ff634680d24 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 21 Nov 2022 09:33:20 -0800 Subject: [PATCH 3/4] 2022-11-21 09:33:20AM --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ea86143fa..14fa751fa 100644 --- a/README.md +++ b/README.md @@ -62,15 +62,15 @@ The easiest way to install is with our install script: curl -fsSL https://d2lang.com/install.sh | sh -s -- ``` -For detailed installation docs, with alternative methods and examples for each OS, see -[./docs/INSTALL.md](./docs/INSTALL.md). - To uninstall: ```sh curl -fsSL https://d2lang.com/install.sh | sh -s -- --uninstall ``` +For detailed installation docs, with alternative methods and examples for each OS, see +[./docs/INSTALL.md](./docs/INSTALL.md). + ## D2 as a library In addition to being a runnable CLI tool, D2 can also be used to produce diagrams from From a68434c28f7bd7a8b68984166255d498e0d23f4c Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Mon, 21 Nov 2022 09:35:49 -0800 Subject: [PATCH 4/4] 2022-11-21 09:35:49AM --- docs/INSTALL.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 97af0744a..cf6599adb 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -13,6 +13,9 @@ This file documents all the ways by which you can install D2. ## 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 # 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.