@theneo/vanilla
v0.1.0
Published
Standalone Theneo API Reference bundle for script tags and static hosting
Readme
@theneo/vanilla
Standalone browser bundle for the Theneo API Reference (React + @theneo/reference-api).
In this monorepo
From the repository root:
yarn install
yarn turbo run build --filter=@theneo/vanillaOr build everything with yarn build. Typechecking: yarn workspace @theneo/vanilla check-types.
See the root README for the full architecture overview.
Build outputs
After yarn build in this package:
dist/theneo.umd.js— UMD for<script>tags; globalTheneodist/theneo.es.mjs— ES moduledist/style.css— bundled styles
Usage (HTML)
<link rel="stylesheet" href="./style.css" />
<div id="theneo-root"></div>
<script src="./theneo.umd.js"></script>
<script>
Theneo.createApiReference(document.getElementById("theneo-root"), {
specUrl: "/openapi.json",
title: "My API",
});
</script>API
createApiReference(element, config?)
- element — DOM node to mount into
- config —
{ specUrl?, spec?, theme?, title? }
Requirements
- Bundles React runtime; consumers do not need to install React for the script-tag flow.
