包详细信息

unexpected-documentation-site-generator

unexpectedjs661MIT8.1.2

Documentation site generator for Unexpected plugins

unexpected, documentation

自述文件

The Unexpected documentation site generator

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 package.json:

"scripts": {
  "generate-site": "generate-site",
  "deploy-site": "deploy-site"
},

If you need a custom setup for your pages, you can add a bootstrap file. By convertion we call this bootstrap-unexpected-markdown.js which we add to the project root containing the following code:

// It is important that unexpected is global:
expect = require('unexpected').clone();
expect.use(require('my-plugin'));

This setup file allows defining additional globals that will be available to the examples in your documentation files. In this example we use it to define the version of unexpected to uswe when testing and load a plugin by default.

We know this step my be a little annoying, but we need to control which version of unexpected is used and our experience has shown a peer dependency wont cut it.

Then you update your npm scripts to require the bootstrap file:

"scripts": {
  "generate-site": "generate-site --require ./bootstrap-unexpected-markdown.js",
  "deploy-site": "deploy-site"
},

Now you are ready to add markdown files in a documentation directory. The subfolders assertions and api are special. In the assertions folder you add documentation for assertions grouped by type. In the api folder you add documentation for api methods. See unexpected as an example on how to structure the documentation.

generate-site options

--require <file>

Specify a file to be required into the global scope.

--output <directory>

Changes the default output directory from site-build.

--assertions <glob pattern>

Changes the default pattern for finding assertion files from assertions/*/*.md.

更新日志

v8.1.2 (2023-08-31)

v8.1.0 (2023-08-29)

v8.0.2 (2023-08-31)

v8.0.1 (2023-05-01)

v8.0.0 (2023-04-30)

Pull requests

Commits to master

v7.1.0 (2020-08-23)

v7.0.2 (2020-08-23)

v7.0.1 (2020-07-04)

Pull requests

  • #44 Ensure assets in the documentation directory are included in builds. (Alex J Burke)

Commits to master

v7.0.0 (2020-07-04)

Pull requests

Commits to master

v6.2.0 (2020-01-05)

Pull requests

Commits to master

v6.1.0 (2019-11-13)

Pull requests

Commits to master

v6.0.0 (2019-01-18)

v5.2.0 (2019-01-10)

v5.1.0 (2019-01-03)

Pull requests

Commits to master

v5.0.1 (2019-01-02)

v5.0.0 (2018-10-30)

v4.7.1 (2018-08-11)

v4.7.0 (2018-08-11)

  • #7 Make sure that assertion urls is referenced with an ending slash (Sune Simonsen)

v4.6.1 (2017-08-27)

v4.6.0 (2017-08-27)

v4.5.0 (2017-07-05)

v4.4.0 (2017-04-24)

v4.3.0 (2017-03-04)

Pull requests

Commits to master

v4.2.4 (2016-09-21)

v4.2.3 (2016-08-25)

v4.2.2 (2016-08-25)

v4.2.1 (2016-07-09)

v4.2.0 (2016-05-09)

v4.1.0 (2016-04-06)

v4.0.0 (2015-12-06)

v3.3.1 (2015-11-06)

v3.3.0 (2015-11-06)

v3.2.0 (2015-10-09)

v3.1.3 (2015-10-09)

v3.1.2 (2015-10-08)

v3.1.1 (2015-10-08)

v3.1.0 (2015-10-06)

  • #3 Assertion pages: Include a list of all the variants of the assertion. (Andreas Lind)

v3.0.0 (2015-09-25)

v2.9.2 (2015-08-12)

v2.9.1 (2015-08-09)

v2.9.0 (2015-08-09)

v2.8.0 (2015-08-09)

v2.7.0 (2015-08-04)

v2.6.2 (2015-07-30)

v2.6.1 (2015-07-30)

v2.6.0 (2015-07-29)

v2.5.2 (2015-07-07)

v2.5.1 (2015-06-30)

v2.5.0 (2015-06-29)

v2.4.0 (2015-06-24)

v2.3.1 (2015-06-23)

v2.3.0 (2015-06-10)

v2.2.3 (2015-05-07)

v2.2.2 (2015-05-07)

v2.2.1 (2015-05-07)

v2.2.0 (2015-05-07)

v2.1.0 (2015-05-07)

v2.0.1 (2015-05-06)

v2.0.0 (2015-05-06)

v1.0.1 (2015-05-06)

v1.0.0