Browse Source

fix: update all old CLI references

friedger-patch-1
Alexander Graebe 4 years ago
committed by Alexander Graebe
parent
commit
879c57c1fc
  1. 4
      README.md
  2. 5
      next.config.js
  3. 2
      package.json
  4. 1160
      src/_data/cli-reference.json
  5. 2
      src/common/navigation.yaml
  6. 2
      src/pages/ecosystem/contributing.md
  7. 25
      src/pages/references/stacks-cli.md

4
README.md

@ -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

5
next.config.js

@ -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',
@ -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',

2
package.json

@ -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",

1160
src/_data/cli-reference.json

File diff suppressed because one or more lines are too long

2
src/common/navigation.yaml

@ -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

2
src/pages/ecosystem/contributing.md

@ -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.

25
src/pages/references/blockstack-cli.md → src/pages/references/stacks-cli.md

@ -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'
@ -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
```
Loading…
Cancel
Save