From d66a4c85772be3daaa56e40a43114efb7ac0693e Mon Sep 17 00:00:00 2001 From: "justin.fiedler" Date: Mon, 18 Sep 2023 20:04:13 +0000 Subject: [PATCH] fix: add homebrew instructions to Ampli overview page, code cleanup --- includes/ampli/cli-install-only.md | 16 ++++++++++++++++ includes/ampli/cli-install-simple.md | 16 +--------------- includes/ampli/pages/ampli-overview.md | 8 +------- 3 files changed, 18 insertions(+), 22 deletions(-) create mode 100644 includes/ampli/cli-install-only.md diff --git a/includes/ampli/cli-install-only.md b/includes/ampli/cli-install-only.md new file mode 100644 index 000000000..71305e6cc --- /dev/null +++ b/includes/ampli/cli-install-only.md @@ -0,0 +1,16 @@ +### Install the Ampli CLI + +You can install the [Ampli CLI](/data/ampli/cli/) from Homebrew or NPM. + +=== "brew" + + ```bash + brew tap amplitude/ampli + brew install ampli + ``` + +=== "npm" + + ```bash + npm install -g @amplitude/ampli + ``` diff --git a/includes/ampli/cli-install-simple.md b/includes/ampli/cli-install-simple.md index aa9abf3a4..56ef5a7d0 100644 --- a/includes/ampli/cli-install-simple.md +++ b/includes/ampli/cli-install-simple.md @@ -1,19 +1,5 @@ -### Install the Ampli CLI +--8<-- "includes/ampli/cli-install-only.md" -You can install the [Ampli CLI](/data/ampli/cli/) from Homebrew or NPM. - -=== "brew" - - ```bash - brew tap amplitude/ampli - brew install ampli - ``` - -=== "npm" - - ```bash - npm install -g @amplitude/ampli - ``` ### Pull the Ampli Wrapper into your project Run the Ampli CLI `pull` command to log in to Amplitude Data and download the strongly typed Ampli Wrapper for your tracking plan. Ampli CLI commands are usually run from the project root directory. diff --git a/includes/ampli/pages/ampli-overview.md b/includes/ampli/pages/ampli-overview.md index 36a82637e..b07def86a 100644 --- a/includes/ampli/pages/ampli-overview.md +++ b/includes/ampli/pages/ampli-overview.md @@ -87,13 +87,7 @@ The following examples will reference this tracking plan. The Ampli CLI connects to Amplitude Data and uses the schema information for a given Source to generate and verify the Ampli Wrapper in your project. -### Install the Ampli CLI - -NPM and Homebrew are supported. - -```shell -npm install -g @amplitude/ampli -``` +--8<-- "includes/ampli/cli-install-only.md" ### Generate the Ampli Wrapper with `ampli pull`