⚠️ Oops! This page doesn't appear to define a type called _.
Edit

State

This module does not have a toplevel documentation block.

let indent: string => string

let showOption: (option('a), 'a => string) => string

let showOptionString: option(string) => string

type bucklescriptOptions = { packageRoot: string, bsRoot: string, refmt: string, version: string, browserCompilerPath: option(string), silentFailures: bool, tmp: string, compiledDependencyDirectories: list((string, string)), packageJsonName: string }

type backend = | NoBackend | Bucklescript(bucklescriptOptions)

let showBackend: backend => string

module Model

This module does not have a toplevel documentation block.

type codeContext = | Normal | Node | Window | Iframe | Canvas | Div | Log

let contextString: codeContext => string

type expectation = | Succeed | Raise | DontRun | TypeFail | DontType | ParseFail | Skip

type codeDisplay = { prefix: int, suffix: int, noEdit: bool, hide: bool }

type lang = | Reason | OCaml | Txt | OtherLang(string)

let showLang: lang => string

type codeOptions = { context: codeContext, lang: lang, expectation: expectation, codeDisplay: codeDisplay, inferred: bool, sharedAs: option(string), uses: list(string) }

type compilationResult = | Skipped | ParseError(string) | TypeError(string, string) | Success(string, string)

type codeBlock = { langLine: string, raw: string, html: string, page: string, filePath: string, compilationResult: compilationResult }

This represents the final result of a code block, all that's needed to render it

type id = string

module Docs

This module does not have a toplevel documentation block.

type docItem = | Value(Types.type_expr) | Type(Types.type_declaration) | Module(moduleContents) | Include(option(Path.t), list(doc)) | StandaloneDoc(Omd.t)

type moduleContents = | Items(list(doc)) | Alias(Path.t)

type doc = (string, option(Omd.t), docItem)

let itemName: docItem => string

let iter: ( (string, option(Omd.t), docItem) => 'a, doc ) => unit

let iterWithPath: ( ~modulesAtPath: Hashtbl.t(string, list(doc)), list(string), (list(string), (string, option(Omd.t), docItem)) => 'a, doc ) => unit

type customPage = { title: string, sourcePath: option(string), destPath: string, contents: docWithExamples }

type sidebarListing = | SidebarItem(string) | SidebarHeader(string, list(sidebarListing))

type sidebar = { pages: list(sidebarListing), modules: list(string) }

type topModule = { name: string, sourcePath: string, docs: option(docWithExamples), items: list(doc), stamps: stamps }

type package = { name: string, repo: option(string), custom: list(customPage), sidebar: option(sidebar), modules: list(topModule), canBundle: bool, noPlayground: bool, namespaced: bool, backend: backend, defaultCodeOptions: option(codeOptions) }

type codeBlocks = Hashtbl.t( (string, string, string), codeBlock )

type world = {packages: list((string, package))}

module Input

Ok folks, so the above is what I think I want as the middle stage

From this middle stage I'm confident I can produce some nice documentation. Not 100% sure when compilation (code block processing) happens tho

And now, how do I go from "cli args" to "that middle stage"

There's probably a "first stage" that we get from cli args

other items defined

type env = {static: string, debug: bool}

let showEnv: env => string

type meta = {packageName: string, repo: option(string)}

let showMeta: meta => string

type packageInput = { root: string, meta: meta, backend: backend, sidebarFile: option(string), customFiles: list((string, option(string), string)), moduleFiles: list((string, string)), defaultCodeOptions: option(codeOptions), namespaced: bool, canBundle: bool, noPlayground: bool }

type target = { directory: string, template: option(string), skipStdlibCompletions: bool, search: bool }

type t = { target: target, packageInput: packageInput, env: env }

let show: t => string