Skip to content

Commit

Permalink
Use a dummy readme when testing the renderer (#857)
Browse files Browse the repository at this point in the history
  • Loading branch information
Towerism authored and aciccarello committed Sep 19, 2018
1 parent c109e8b commit 589f15a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 124 deletions.
28 changes: 28 additions & 0 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Example

> Example Documentation
## Installation

Example install

```bash
$ npm install examples --save-dev
```

Example executable: ``examples``.

## Usage

### Shell

Example usage.

```bash
$ examples --out path/to/documentation/ path/to/example/project/
```

### Arguments

* `--example <project>`<br>
Example explanation.
1 change: 1 addition & 0 deletions src/test/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ describe('Renderer', function() {
mode: 'Modules',
logger: 'console',
target: 'ES5',
readme: Path.join(src, '..', 'README.md'),
module: 'CommonJS',
gaSite: 'foo.com' // verify theme option without modifying output
});
Expand Down
133 changes: 9 additions & 124 deletions src/test/renderer/specs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,138 +64,23 @@ <h1> typedoc</h1>
<div class="row">
<div class="col-8 col-content">
<div class="tsd-panel tsd-typography">
<h1 id="typedoc">TypeDoc</h1>
<h1 id="example">Example</h1>
<blockquote>
<p>Documentation generator for TypeScript projects.</p>
<p>Example Documentation</p>
</blockquote>
<p><a href="https://travis-ci.org/TypeStrong/typedoc"><img src="https://travis-ci.org/TypeStrong/typedoc.svg?branch=master" alt="Build Status"></a>
<a href="http://badge.fury.io/js/typedoc"><img src="https://badge.fury.io/js/typedoc.svg" alt="NPM Version"></a>
<a href="https://gitter.im/TypeStrong/typedoc?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://badges.gitter.im/TypeStrong/typedoc.svg" alt="Chat on Gitter"></a>
<a href="https://greenkeeper.io/"><img src="https://badges.greenkeeper.io/TypeStrong/typedoc.svg" alt="Greenkeeper Enabled"></a></p>
<h2 id="installation">Installation</h2>
<p>TypeDoc runs on Node.js and is available as an NPM package. You can install TypeDoc
in your project&#39;s directory as usual:</p>
<pre><code class="language-bash">$ npm install typedoc --save-dev</code></pre>
<p>Like the TypeScript compiler, TypeDoc comes with a binary that can be called from anywhere
if you install TypeDoc as a global module. The name of the executable is <code>typedoc</code>.</p>
<pre><code class="language-bash">$ npm install typedoc --global
$ typedoc</code></pre>
<p>Example install</p>
<pre><code class="language-bash">$ npm install examples --save-dev</code></pre>
<p>Example executable: <code>examples</code>. </p>
<h2 id="usage">Usage</h2>
<h3 id="shell">Shell</h3>
<p>TypeDoc accepts most of the command line arguments that the TypeScript compiler accepts. One major
difference is the fact that one may pass an entire directory instead of individual files to the documentation
generator. So in order to create a documentation for an entire project you simply type:</p>
<pre><code class="language-bash">$ typedoc --out path/to/documentation/ path/to/typescript/project/</code></pre>
<h3 id="important-note">Important note</h3>
<p>Starting with version 0.2, TypeDoc no longer can predict whether files should be treated as modules
or whether the project should be compiled into one big namespace. You must specify the <code>mode</code> argument
in order to change the behaviour of TypeDoc.</p>
<p>Example usage.</p>
<pre><code class="language-bash">$ examples --out path/to/documentation/ path/to/example/project/</code></pre>
<h3 id="arguments">Arguments</h3>
<ul>
<li><code>--out &lt;path/to/documentation/&gt;</code><br>
Specifies the location the documentation should be written to.</li>
<li><code>--mode &lt;file|modules&gt;</code><br>
Specifies the output mode the project is used to be compiled with.</li>
<li><code>--options</code><br>
Specify a js option file that should be loaded. If not specified TypeDoc will look for &#39;typedoc.js&#39; in the current directory.</li>
<li><code>--json &lt;path/to/output.json&gt;</code><br>
Specifies the location and file name a json file describing the project is written to. When specified no documentation will be generated.</li>
<li><code>--ignoreCompilerErrors</code><br>
Should TypeDoc still generate documentation pages even after the compiler has returned errors?</li>
<li><code>--example &lt;project&gt;</code><br>
Example explanation.</li>
</ul>
<h4 id="source-file-handling">Source file handling</h4>
<ul>
<li><code>--exclude &lt;pattern&gt;</code><br>
Exclude files by the given pattern when a path is provided as source. Supports standard minimatch patterns (see <a href="https://github.com/TypeStrong/typedoc/issues/170">#170</a>)</li>
<li><code>--includeDeclarations</code><br>
Turn on parsing of .d.ts declaration files.</li>
<li><code>--externalPattern &lt;pattern&gt;</code><br>
Define a pattern for files that should be considered being external.</li>
<li><code>--excludeExternals</code><br>
Prevent externally resolved TypeScript files from being documented.</li>
<li><code>--excludePrivate</code><br>
Prevent private members from being included in the generated documentation.</li>
<li><code>--excludeProtected</code><br>
Prevent protected members from being included in the generated documentation.</li>
</ul>
<h4 id="typescript-compiler">TypeScript compiler</h4>
<ul>
<li><code>--module &lt;commonjs, amd, system or umd&gt;</code><br>
Specify module code generation: &quot;commonjs&quot;, &quot;amd&quot;, &quot;system&quot; or &quot;umd&quot;.</li>
<li><code>--target &lt;ES3, ES5, or ES6&gt;</code><br>
Specify ECMAScript target version: &quot;ES3&quot; (default), &quot;ES5&quot; or &quot;ES6&quot;</li>
<li><code>--tsconfig &lt;path/to/tsconfig.json&gt;</code><br>
Specify a typescript config file that should be loaded. If not specified TypeDoc will look for &#39;tsconfig.json&#39; in the current directory.</li>
</ul>
<h4 id="theming">Theming</h4>
<ul>
<li><code>--theme &lt;default|minimal|path/to/theme&gt;</code><br>
Specify the path to the theme that should be used.</li>
<li><code>--name &lt;Documentation title&gt;</code><br>
Set the name of the project that will be used in the header of the template.</li>
<li><code>--readme &lt;path/to/readme|none&gt;</code><br>
Path to the readme file that should be displayed on the index page. Pass <code>none</code> to disable the index page
and start the documentation on the globals page.</li>
<li><code>--plugin</code><br>
Specify the npm plugins that should be loaded. Omit to load all installed plugins, set to &#39;none&#39; to load no plugins.</li>
<li><code>--hideGenerator</code><br>
Do not print the TypeDoc link at the end of the page.</li>
<li><code>--gaID</code><br>
Set the Google Analytics tracking ID and activate tracking code.</li>
<li><code>--gaSite &lt;site&gt;</code><br>
Set the site name for Google Analytics. Defaults to <code>auto</code></li>
<li><code>--entryPoint &lt;fully.qualified.name&gt;</code><br>
Specifies the fully qualified name of the root symbol. Defaults to global namespace.</li>
<li><code>--gitRevision &lt;revision|branch&gt;</code><br>
Use specified revision or branch instead of the last revision for linking to GitHub source files.</li>
</ul>
<h4 id="content">Content</h4>
<ul>
<li><p><code>--includes &lt;path/to/includes&gt;</code><br>
Specifies the location to look for included documents. One may use <code>[[include:FILENAME]]</code>
in comments to include documents from this location.</p>
</li>
<li><p><code>--media &lt;path/to/media&gt;</code><br>
Specifies the location with media files that should be copied to the output directory. In order to create
a link to media files use the pattern <code>media://FILENAME</code> in comments.</p>
</li>
</ul>
<h4 id="miscellaneous">Miscellaneous</h4>
<ul>
<li><code>--version</code><br>
Display the version number of TypeDoc.</li>
<li><code>--help</code><br>
Display all TypeDoc options.</li>
</ul>
<h3 id="webpack">Webpack</h3>
<p>There is a plugin available to run TypeDoc with Webpack created by Microsoft. You can find it on NPM:<br>
<a href="https://www.npmjs.com/package/typedoc-webpack-plugin">https://www.npmjs.com/package/typedoc-webpack-plugin</a></p>
<h3 id="gulp">Gulp</h3>
<p>There is a plugin available to run TypeDoc with Gulp created by Rogier Schouten. You can find it on NPM:<br>
<a href="https://www.npmjs.org/package/gulp-typedoc/">https://www.npmjs.org/package/gulp-typedoc/</a></p>
<h3 id="grunt">Grunt</h3>
<p>There is a plugin available to run TypeDoc with Grunt created by Bart van der Schoor. You can find it on NPM:<br>
<a href="https://www.npmjs.org/package/grunt-typedoc">https://www.npmjs.org/package/grunt-typedoc</a></p>
<h2 id="plugins">Plugins</h2>
<ul>
<li><a href="https://github.com/christopherthielen/typedoc-plugin-external-module-name">External Module Name</a> - Set the name of TypeDoc external modules</li>
<li><a href="https://github.com/gdelmas/typedoc-plugin-sourcefile-url">Sourcefile URL</a> - Set custom source file URL links</li>
<li><a href="https://github.com/christopherthielen/typedoc-plugin-internal-external">Internal/External Module</a> - Explicitly mark modules as <code>@internal</code> or <code>@external</code></li>
<li><a href="https://github.com/christopherthielen/typedoc-plugin-single-line-tags">Single Line Tags</a> - Process certain <code>@tags</code> as single lines</li>
<li><a href="https://github.com/IgniteUI/typedoc-plugin-localization">Localization</a> - Generate documentation for different languages</li>
</ul>
<h2 id="advanced-guides-and-docs">Advanced guides and docs</h2>
<p>Visit our homepage for advanced guides and an extensive API documentation:<br>
<a href="http://typedoc.org">http://typedoc.org</a></p>
<h2 id="contributing">Contributing</h2>
<p>This project is maintained by a community of developers. Contributions are welcome and appreciated.
You can find TypeDoc on GitHub; feel free to start an issue or create a pull requests:<br>
<a href="https://github.com/TypeStrong/typedoc">https://github.com/TypeStrong/typedoc</a></p>
<p>For more information, read the <a href="https://github.com/TypeStrong/typedoc/contributing.md">contribution guide</a>.</p>
<h2 id="license">License</h2>
<p>Copyright (c) 2015 <a href="http://typedoc.org">Sebastian Lenz</a>.<br>
Copyright (c) 2016-2018 <a href="https://github.com/TypeStrong/typedoc/graphs/contributors">TypeDoc Contributors</a>.<br>
Licensed under the Apache License 2.0.</p>
</div>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
Expand Down

0 comments on commit 589f15a

Please sign in to comment.