Skip to content

Commit

Permalink
fix: update all old CLI references
Browse files Browse the repository at this point in the history
  • Loading branch information
agraebe authored and Alexander Graebe committed Dec 17, 2020
1 parent 4d7ae0d commit 879c57c
Show file tree
Hide file tree
Showing 7 changed files with 1,192 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ If you are interested in contributing to the site and making changes, please ref

### Blockstack CLI reference

The `src/_data/cli-reference.json` file is generated from the `blockstack-cli` subcommand `docs`.
The `src/_data/cli-reference.json` file is generated from the `stx` subcommand `docs`.

1. Install the latest version of the cli according to the instructions at: https://github.com/blockstack/stacks.js/tree/master/packages/cli

2. Generate the json for the cli in the `docs.blockstack` repo.

```
$ blockstack-cli docs > src/_data/cli-reference.json
$ stx docs > src/_data/cli-reference.json
```

### Clarity Reference
Expand Down
5 changes: 3 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ async function redirects() {
destination: '/references/faqs/stacks-token',
permanent: true,
},
{ source: '/core/cmdLineRef.html', destination: '/references/blockstack-cli', permanent: true },
{ source: '/core/cmdLineRef.html', destination: '/references/stacks-cli', permanent: true },
{ source: '/references/stx ', destination: '/references/stacks-cli', permanent: true },
{
source: '/core/smart/clarityref',
destination: '/references/language-clarity',
Expand Down Expand Up @@ -418,7 +419,7 @@ async function redirects() {
{ source: '/naming-services', destination: '/technology/naming-system/', permanent: true },
{ source: '/naming-system', destination: '/technology/naming-system/', permanent: true },
{ source: '/storage-hubs', destination: '/storage-hubs/overview', permanent: true },
{ source: '/references', destination: '/references/blockstack-cli', permanent: true },
{ source: '/references', destination: '/references/stacks-cli', permanent: true },
{ source: '/ecosystem', destination: '/ecosystem/overview', permanent: true },
{
source: '/stacks-blockchain/testnet-node',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"start": "next telemetry disable && NODE_ENV=production next start",
"clean:build-files": "rimraf .next && rimraf .cache",
"dev": "yarn clean:build-files && next dev",
"build:cli-reference": "blockstack-cli docs > src/_data/cli-reference.json",
"build:cli-reference": "stx docs > src/_data/cli-reference.json",
"export": "next export",
"lint": "yarn lint:eslint && yarn lint:prettier",
"lint:eslint": "eslint \"src/**/*.{ts,tsx}\" -f unix",
Expand Down
1,160 changes: 1,159 additions & 1 deletion src/_data/cli-reference.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/common/navigation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ sections:
- path: /references
usePageTitles: true
pages:
- path: /blockstack-cli
- path: /stacks-cli
- path: /stacking-contract
- path: /stacks-blockchain-api
- path: /stacks-node-configuration
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ecosystem/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ The script will process that file and pull out the title from the frontmatter of
### Non-standard pages

There are a few pages within these docs that are non-standard markdown pages. This means they are using some kind of external data as their source,
such as the [Clarity Reference page](/references/language-overview), or the [Blockstack CLI page](/references/blockstack-cli). These pages are using a function of Next.js called
such as the [Clarity Reference page](/references/language-overview), or the [Blockstack CLI page](/references/stacks-cli). These pages are using a function of Next.js called
[`getStaticProps`](https://nextjs.org/docs/basic-features/data-fetching#getstaticprops-static-generation) which allows us to
fetch external data at runtime and use it in some way within our pages.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Stacks CLI
description: Interacting with the Stacks 2.0 Blockchain via CLI
---

export { convertBlockstackCLIUsageToMdx as getStaticProps } from '@common/data/cli-ref'
Expand Down Expand Up @@ -27,6 +28,30 @@ You must have [Node.js](https://nodejs.org/en/download/) v12 or higher (v14 reco

To install the command line, do the following:

### Step 1: [Download or `git clone` the command line repository code](https://github.com/blockstack/stacks.js/tree/master/packages/cli)

Downloading or cloning the repo creates a `cli-blockstack` repository on your system.

### Step 2: Change directory into the `cli-blockstack` directory

```bash
cd cli-blockstack
```

### Step 3: Install the dependencies with `npm`

```bash
npm install
```

### Step 4: Build the command line command

```bash
npm run build
```

### Step 5: Link the command

```bash
npm install -g @stacks/cli
```
Expand Down

0 comments on commit 879c57c

Please sign in to comment.