Catalog npm
Back to packageRELEASE DETAILS

2.0.5

npm

@0x/react-docs

React documentation component for rendering TypeDoc & sol-doc generated JSON

Published25 Feb 2019
Direct dependencies28
Transitive dependenciesNot calculated

README

Current package documentation

@0x/react-docs

WARNING: Alpha software. Expect things to break when trying to use.

A full-page React component for rendering beautiful documentation for Solidity and Typescript code generated with TypeDoc or sol-doc.

react-docs generating 0x's smart contract docs

Features

  • Mobile optimized
  • Reads Javadoc-style comments in your code to generate class/method/argument/return/type comments.
  • Syntax highlighting support for TypeScript & Solidity
  • Type declaration linking
  • Type declaration popovers to avoid clicking through to the definition
  • Section/method/type anchors for easily pointing others to a specific part of your docs.
  • Version picker
  • Customizable sidebar header
  • Supports custom markdown sections so you can easily add an intro or installation instructions.

Installation

yarn add @0x/react-docs

Usage

This package exposes both a single Documentation react component that will render a docs page, as well as all of it's sub-components in case someone wants to build their own layout.

Currently this package still has some external dependencies outside of the Documentation component, so please start your project off by copying the react-docs-example directory and modifying it there. If you need changes in the react-docs package, fork the 0x monorepo, make the required changes and submit a PR. Until we merge it, you can have your project depend on your own custom fork.

If your project is in TypeScript, add the following to your tsconfig.json:

"compilerOptions": {
    "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
}

Future improvements

Feel free to contribute to these improvements!

  • Allow user to pass in styling for all major elements similar to Material-UI.
  • Allow user to define an alternative font and have it change everywhere.
  • Add source links to Solidity docs (currently unsupported by solc, which underlies sol-doc).

Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our contribution guidelines before getting started.

Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

yarn config set workspaces-experimental true

Then install dependencies

yarn install

Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

PKG=@0x/react-docs yarn build

Or continuously rebuild on change:

PKG=@0x/react-docs yarn watch

Clean

yarn clean

Lint

yarn lint

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 28

Native requirements
28 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
react
Environment
{
  "local_name": "react",
  "alias": false,
  "peer_metadata": null
}
^16.5.2runtime
lodash
Environment
{
  "local_name": "lodash",
  "alias": false,
  "peer_metadata": null
}
^4.17.11runtime
semver
Environment
{
  "local_name": "semver",
  "alias": false,
  "peer_metadata": null
}
5.5.0runtime
basscss
Environment
{
  "local_name": "basscss",
  "alias": false,
  "peer_metadata": null
}
^8.0.3runtime
@0x/types
Environment
{
  "local_name": "@0x/types",
  "alias": false,
  "peer_metadata": null
}
^2.1.0runtime
@0x/utils
Environment
{
  "local_name": "@0x/utils",
  "alias": false,
  "peer_metadata": null
}
^4.2.0runtime
react-dom
Environment
{
  "local_name": "react-dom",
  "alias": false,
  "peer_metadata": null
}
^16.5.2runtime
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
*runtime
material-ui
Environment
{
  "local_name": "material-ui",
  "alias": false,
  "peer_metadata": null
}
^0.20.0runtime
@types/react
Environment
{
  "local_name": "@types/react",
  "alias": false,
  "peer_metadata": null
}
*runtime
react-scroll
Environment
{
  "local_name": "react-scroll",
  "alias": false,
  "peer_metadata": null
}
0xproject/react-scroll#pr-330-and-replace-stateruntime
@types/lodash
Environment
{
  "local_name": "@types/lodash",
  "alias": false,
  "peer_metadata": null
}
4.14.104runtime
react-tooltip
Environment
{
  "local_name": "react-tooltip",
  "alias": false,
  "peer_metadata": null
}
^3.2.7runtime
react-markdown
Environment
{
  "local_name": "react-markdown",
  "alias": false,
  "peer_metadata": null
}
^3.2.2runtime
@0x/react-shared
Environment
{
  "local_name": "@0x/react-shared",
  "alias": false,
  "peer_metadata": null
}
^2.0.5runtime
@types/react-dom
Environment
{
  "local_name": "@types/react-dom",
  "alias": false,
  "peer_metadata": null
}
*runtime
compare-versions
Environment
{
  "local_name": "compare-versions",
  "alias": false,
  "peer_metadata": null
}
^3.0.1runtime
styled-components
Environment
{
  "local_name": "styled-components",
  "alias": false,
  "peer_metadata": null
}
^4.1.1runtime
@types/material-ui
Environment
{
  "local_name": "@types/material-ui",
  "alias": false,
  "peer_metadata": null
}
^0.20.0runtime
@types/react-scroll
Environment
{
  "local_name": "@types/react-scroll",
  "alias": false,
  "peer_metadata": null
}
1.5.3runtime
shx
Environment
{
  "local_name": "shx",
  "alias": false,
  "peer_metadata": null
}
^0.2.2development
tslint
Environment
{
  "local_name": "tslint",
  "alias": false,
  "peer_metadata": null
}
5.11.0development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
3.0.1development
@0x/dev-utils
Environment
{
  "local_name": "@0x/dev-utils",
  "alias": false,
  "peer_metadata": null
}
^2.1.1development
@0x/tslint-config
Environment
{
  "local_name": "@0x/tslint-config",
  "alias": false,
  "peer_metadata": null
}
^3.0.0development
make-promises-safe
Environment
{
  "local_name": "make-promises-safe",
  "alias": false,
  "peer_metadata": null
}
^1.1.0development
@types/compare-versions
Environment
{
  "local_name": "@types/compare-versions",
  "alias": false,
  "peer_metadata": null
}
^3.0.0development
@types/styled-components
Environment
{
  "local_name": "@types/styled-components",
  "alias": false,
  "peer_metadata": null
}
4.0.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "9aaadfc1f09e14bc391321ee5eea739fcba383db",
  "tarball": "https://registry.npmjs.org/@0x/react-docs/-/react-docs-2.0.5.tgz",
  "fileCount": 81,
  "integrity": "sha512-MWTiGkm0zSY5962BagCgTEX1Wpfq9oY4uP8drp05N360smfvYCFOnlU8u2Yi5bvGSc+tGp8aIM3jNQ92dEbBPw==",
  "signatures": [
    {
      "sig": "MEQCIEVLMwlwAFjJNd9rikxvOVuJEZkAZxfmTQmT0jwBBq+bAiAQTIsdgX8hWaChJd6EvEwJaIBuCxszkxtHnOa6wSAZBA==",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 183214,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcdF+0CRA9TVsSAnZWagAA208P/2rjHmTyUE8dnD8ZgbCD\ntRUqn2XWTPTHSF14ToYbxe1lI0aClB8gg3DfrEltR/KjMf55B5c4cxWug1N+\nKYGFc89GL58Z83a4V8GM6FimNbIeReeLLNYL0L1YRHMWL/tRHb9TriJPO0uL\n8FDQm1BmmEEsQhq8Mghynhg2dn84MfW3sqEVw8TBvNsSedDfuFK0kGk6ngHU\nMcEHzA+WlK6H9qGswlVGCIICdgOj7Y1PjsU7yOpXniyfY0jtYtUdUIrmplN1\nncH+I0dGjoSLj3rmbEGS8FKXbGiJo6BU65PDIC4yVuwEL2JBAZj3wXWPUBh+\nxGW6osHpjg8KuHnqUWBL4fBGrz1AKsDqKXfD4cC/1Il0bcHS9R6td0grmMmw\ntBerUd8cZFA4rD9nBB8HcOCsI4dqqcyCLpaqNzEy1R490EG3aMNLpHhthY9k\nsVBtTKVNxSEypLDFtiGn5NrGfUsrT6GAVJLmSF8yFqvozLyxZR/7D9uyJFxS\npW4xul4Ioc5CT0OjCxtRVxWW//tB8n5BthP2Q/VnKxlYoM45U1+lsBuztb06\nMhY4BLDOy6JiTR2ULfEqUL3UoUdppOU1yDNmdQ/f4glVpPc7oKkiHWkod1Kn\ncIK55Lv1qmz8/rw2/DjWJmfqUSL3i4d+lbD4gBuqscd3vMrG2S+hS8f9IuRK\nwrOZ\r\n=ieK7\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
0xproject/0x-monorepo

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:29 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:249c9e032dc281cffa9f77ee106642c2c32af22ad59e220bab2fd67adca7e552

Other collected versions

2.0.1524 Jul2.0.1413 Jul2.0.1313 Jul2.0.1224 May2.0.1110 May2.0.1011 AprView all collected versions →