0.0.2 • Published 10 months ago

@weborigami/gist v0.0.2

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

This Origami extension returns an async tree for a GitHub gist.

To use this, you will need to first obtain a GitHub fine-grained personal access token.

  1. Follow those instructions to obtain a token, which will be a sequence of letters and numbers. Copy the token.
  2. Paste the token into a new local file called, e.g., githubToken.
  3. It's important to not check that file into source control. Create a .gitignore file and add the file's name to it.

Usage

  1. Use npm to install the main @weborigami/origami package and this @weborigami/gist extension.
  2. Obtain a GitHub token (above).
  3. Identify the ID at the end of the GitHub gist you want to read. Example: for the gist at https://gist.github.com/JanMiksovsky/2d6e386378732c01110e2c61c3dadb76, then ID is 2d6e386378732c01110e2c61c3dadb76.

You can then use the Origami CLI to display all the files in the gist:

$ ori "package:@weborigami/gist(githubToken)/2d6e386378732c01110e2c61c3dadb76"
README.md: This is the Read Me file.
data.json: |-
  {
    "message": "Hello, world!"
  }

Or traverse a specific file and value in the gist:

$ ori "package:@weborigami/gist(githubToken)/2d6e386378732c01110e2c61c3dadb76/data.json/message"
Hello, world!
0.0.2

10 months ago

0.0.1

10 months ago