0.1.7 • Published 4 months ago

@blitzm/doccy v0.1.7

Weekly downloads
61
License
-
Repository
-
Last release
4 months ago

doccy

Overview

Doccy is a documentation tool for GRPC APIs.

Doccy includes a CLI program that can be used to generate a static JSON file that represents your GRPC Proto Spec.

Doccy also includes a React component that can use the generated JSON file to render documentation inside your website.

See the "./example" directory to see a minimal React application that shows the Doccy's <DoccyPage protojson={require('../doccyprotos.json')} /> component.

Creating a doccyprotos.json file

npm install @blitzm/doccy

# see usage
./node_modules/.bin/doccy --help

# generate a doccyprotos.json file from
# a directory containing .proto files
./node_modules/.bin/doccy -o doccyprotos.json ./path/to/protos/**/*.proto

Using the React Component

import { DoccyPage } from '@blitzm/doccy';

export function Documentation() {
  return (
    <DoccyPage protojson={require('./doccyprotos.json')} />
  );
}

System Requirements

Development

To develop doccy you can use the "./example" project.

There's an included script called ./doccy.sh that runs the doccy CLI from source using ts-node.

You can use this script to run the doccy CLI from source to generate test doccyprotos.json files.

The example project is a small React app that imports DoccyPage from the lib directory.

To develop the <DoccyPage /> component you can run the example app:

cd ./example
./doccy.sh -o doccyprotos.json ../../path/to/some/protos/**/*.proto
npm install
npm start

Running the Docker Image Locally

# build the image
docker build -t website .

# run the container (localhost:3000)
docker run --rm -it -p 3000:80 website`
0.1.7

4 months ago

0.1.6

8 months ago

0.1.5

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago