Home Manual Reference Source Test Repository
Manual » Example

Example

Minimum

{
  "source": "./src",
  "destination": "./doc"
}

Integrate Test Code Into Documentation

{
  "source": "./src"
  "destination": "./doc",
  "test": {
    "type": "mocha",
    "source": "./test"
  }
}

And if use @test, more better integration.

/** @test {MyClass} */
describe('MyClass has foo bar feature', ()=>{

  /** @test {MyClass#baz} */
  it('MyClass#baz returns magic value', ()=>{
    assert(true);
  });
});

Integrate Manual Into Documentation

{
  "source": "./src",
  "destination": "./doc",
  "manual": {
    "overview": "./manual/overview.md",
    "installation": "./manual/installation.md",
    "usage": "./manual/usage.md",
    "example": "./manual/example.md",
    "faq": "./manual/faq.md",
    "changelog": "./CHANGELOG.md"
  }
}

Use ES7 With Plugin

npm install esdoc-es7-plugin
{
  "source": "./src",
  "destination": "./doc",
  "plugins": [
    {"name": "esdoc-es7-plugin"}
  ]
}

See ESDoc ES7 Plugin for more information.