This is a documentation site generator extracted from unexpected. This module in only useful for building documentation sites for unexpected plugins and unexpected itself.
Then you add the following scripts to
If you need a custom setup for your pages, you can add a bootstrap file:
You add a
bootstrap-unexpected-markdown.js file to your project containing the
// It is important that unexpected is global:unexpected = ;unexpected;
I know this is annoying but we need to control which version of unexpected is used, and a peer dependency wont cut it.
Then you update your npm scripts to require the bootstrap file:
Now you are ready to add markdown files in a documentation directory. The
api are special. In the
folder you add documentation for assertions grouped by type. In the
api folder you add documentation for api methods. See
as an example on how to structure the documentation.
Specify a file to be required into the global scope.
Changes the default output directory from
--assertions <glob pattern>
Changes the default pattern for finding assertion files from
Updated the code examples in the assertion documentation files.