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 }
let showBucklescriptOptions: bucklescriptOptions => 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)
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
type docWithExamples = Omd.t
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 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 )
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