f
run(options?: InitOptions): Task<InitResult, ProjectRootNotFoundFailure>
Bootstraps a qunitx project: writes the test HTML template, updates package.json, and writes tsconfig.json when there isn't one.
I
InitOptions
Where to bootstrap, and which HTML fixtures to write. Both default the way the CLI does:
the working directory, and whatever .html arguments were passed.
-
cwd: string
Directory to find the project root from. Defaults to
process.cwd(). -
htmlPaths: string[]
HTML fixtures to create, relative to the project root. Defaults to
['test/tests.html'].
I
InitResult
What init did, so the caller can report it. Returned rather than printed: the CLI turns
these into its messages, and a programmatic caller gets the same facts as data.
-
skipped: string[]
Paths that already existed and were left alone.
-
written: string[]
Absolute paths of the files this call created.
Usage
import * as mod from "lib/commands/init.ts";