Skip to content

Commit 589f15a

Browse files
Towerismaciccarello
authored andcommitted
Use a dummy readme when testing the renderer (#857)
1 parent c109e8b commit 589f15a

File tree

3 files changed

+38
-124
lines changed

3 files changed

+38
-124
lines changed

examples/basic/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Example
2+
3+
> Example Documentation
4+
5+
## Installation
6+
7+
Example install
8+
9+
```bash
10+
$ npm install examples --save-dev
11+
```
12+
13+
Example executable: ``examples``.
14+
15+
## Usage
16+
17+
### Shell
18+
19+
Example usage.
20+
21+
```bash
22+
$ examples --out path/to/documentation/ path/to/example/project/
23+
```
24+
25+
### Arguments
26+
27+
* `--example <project>`<br>
28+
Example explanation.

src/test/renderer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ describe('Renderer', function() {
5959
mode: 'Modules',
6060
logger: 'console',
6161
target: 'ES5',
62+
readme: Path.join(src, '..', 'README.md'),
6263
module: 'CommonJS',
6364
gaSite: 'foo.com' // verify theme option without modifying output
6465
});

src/test/renderer/specs/index.html

Lines changed: 9 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -64,138 +64,23 @@ <h1> typedoc</h1>
6464
<div class="row">
6565
<div class="col-8 col-content">
6666
<div class="tsd-panel tsd-typography">
67-
<h1 id="typedoc">TypeDoc</h1>
67+
<h1 id="example">Example</h1>
6868
<blockquote>
69-
<p>Documentation generator for TypeScript projects.</p>
69+
<p>Example Documentation</p>
7070
</blockquote>
71-
<p><a href="https://travis-ci.org/TypeStrong/typedoc"><img src="https://travis-ci.org/TypeStrong/typedoc.svg?branch=master" alt="Build Status"></a>
72-
<a href="http://badge.fury.io/js/typedoc"><img src="https://badge.fury.io/js/typedoc.svg" alt="NPM Version"></a>
73-
<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>
74-
<a href="https://greenkeeper.io/"><img src="https://badges.greenkeeper.io/TypeStrong/typedoc.svg" alt="Greenkeeper Enabled"></a></p>
7571
<h2 id="installation">Installation</h2>
76-
<p>TypeDoc runs on Node.js and is available as an NPM package. You can install TypeDoc
77-
in your project&#39;s directory as usual:</p>
78-
<pre><code class="language-bash">$ npm install typedoc --save-dev</code></pre>
79-
<p>Like the TypeScript compiler, TypeDoc comes with a binary that can be called from anywhere
80-
if you install TypeDoc as a global module. The name of the executable is <code>typedoc</code>.</p>
81-
<pre><code class="language-bash">$ npm install typedoc --global
82-
$ typedoc</code></pre>
72+
<p>Example install</p>
73+
<pre><code class="language-bash">$ npm install examples --save-dev</code></pre>
74+
<p>Example executable: <code>examples</code>. </p>
8375
<h2 id="usage">Usage</h2>
8476
<h3 id="shell">Shell</h3>
85-
<p>TypeDoc accepts most of the command line arguments that the TypeScript compiler accepts. One major
86-
difference is the fact that one may pass an entire directory instead of individual files to the documentation
87-
generator. So in order to create a documentation for an entire project you simply type:</p>
88-
<pre><code class="language-bash">$ typedoc --out path/to/documentation/ path/to/typescript/project/</code></pre>
89-
<h3 id="important-note">Important note</h3>
90-
<p>Starting with version 0.2, TypeDoc no longer can predict whether files should be treated as modules
91-
or whether the project should be compiled into one big namespace. You must specify the <code>mode</code> argument
92-
in order to change the behaviour of TypeDoc.</p>
77+
<p>Example usage.</p>
78+
<pre><code class="language-bash">$ examples --out path/to/documentation/ path/to/example/project/</code></pre>
9379
<h3 id="arguments">Arguments</h3>
9480
<ul>
95-
<li><code>--out &lt;path/to/documentation/&gt;</code><br>
96-
Specifies the location the documentation should be written to.</li>
97-
<li><code>--mode &lt;file|modules&gt;</code><br>
98-
Specifies the output mode the project is used to be compiled with.</li>
99-
<li><code>--options</code><br>
100-
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>
101-
<li><code>--json &lt;path/to/output.json&gt;</code><br>
102-
Specifies the location and file name a json file describing the project is written to. When specified no documentation will be generated.</li>
103-
<li><code>--ignoreCompilerErrors</code><br>
104-
Should TypeDoc still generate documentation pages even after the compiler has returned errors?</li>
81+
<li><code>--example &lt;project&gt;</code><br>
82+
Example explanation.</li>
10583
</ul>
106-
<h4 id="source-file-handling">Source file handling</h4>
107-
<ul>
108-
<li><code>--exclude &lt;pattern&gt;</code><br>
109-
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>
110-
<li><code>--includeDeclarations</code><br>
111-
Turn on parsing of .d.ts declaration files.</li>
112-
<li><code>--externalPattern &lt;pattern&gt;</code><br>
113-
Define a pattern for files that should be considered being external.</li>
114-
<li><code>--excludeExternals</code><br>
115-
Prevent externally resolved TypeScript files from being documented.</li>
116-
<li><code>--excludePrivate</code><br>
117-
Prevent private members from being included in the generated documentation.</li>
118-
<li><code>--excludeProtected</code><br>
119-
Prevent protected members from being included in the generated documentation.</li>
120-
</ul>
121-
<h4 id="typescript-compiler">TypeScript compiler</h4>
122-
<ul>
123-
<li><code>--module &lt;commonjs, amd, system or umd&gt;</code><br>
124-
Specify module code generation: &quot;commonjs&quot;, &quot;amd&quot;, &quot;system&quot; or &quot;umd&quot;.</li>
125-
<li><code>--target &lt;ES3, ES5, or ES6&gt;</code><br>
126-
Specify ECMAScript target version: &quot;ES3&quot; (default), &quot;ES5&quot; or &quot;ES6&quot;</li>
127-
<li><code>--tsconfig &lt;path/to/tsconfig.json&gt;</code><br>
128-
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>
129-
</ul>
130-
<h4 id="theming">Theming</h4>
131-
<ul>
132-
<li><code>--theme &lt;default|minimal|path/to/theme&gt;</code><br>
133-
Specify the path to the theme that should be used.</li>
134-
<li><code>--name &lt;Documentation title&gt;</code><br>
135-
Set the name of the project that will be used in the header of the template.</li>
136-
<li><code>--readme &lt;path/to/readme|none&gt;</code><br>
137-
Path to the readme file that should be displayed on the index page. Pass <code>none</code> to disable the index page
138-
and start the documentation on the globals page.</li>
139-
<li><code>--plugin</code><br>
140-
Specify the npm plugins that should be loaded. Omit to load all installed plugins, set to &#39;none&#39; to load no plugins.</li>
141-
<li><code>--hideGenerator</code><br>
142-
Do not print the TypeDoc link at the end of the page.</li>
143-
<li><code>--gaID</code><br>
144-
Set the Google Analytics tracking ID and activate tracking code.</li>
145-
<li><code>--gaSite &lt;site&gt;</code><br>
146-
Set the site name for Google Analytics. Defaults to <code>auto</code></li>
147-
<li><code>--entryPoint &lt;fully.qualified.name&gt;</code><br>
148-
Specifies the fully qualified name of the root symbol. Defaults to global namespace.</li>
149-
<li><code>--gitRevision &lt;revision|branch&gt;</code><br>
150-
Use specified revision or branch instead of the last revision for linking to GitHub source files.</li>
151-
</ul>
152-
<h4 id="content">Content</h4>
153-
<ul>
154-
<li><p><code>--includes &lt;path/to/includes&gt;</code><br>
155-
Specifies the location to look for included documents. One may use <code>[[include:FILENAME]]</code>
156-
in comments to include documents from this location.</p>
157-
</li>
158-
<li><p><code>--media &lt;path/to/media&gt;</code><br>
159-
Specifies the location with media files that should be copied to the output directory. In order to create
160-
a link to media files use the pattern <code>media://FILENAME</code> in comments.</p>
161-
</li>
162-
</ul>
163-
<h4 id="miscellaneous">Miscellaneous</h4>
164-
<ul>
165-
<li><code>--version</code><br>
166-
Display the version number of TypeDoc.</li>
167-
<li><code>--help</code><br>
168-
Display all TypeDoc options.</li>
169-
</ul>
170-
<h3 id="webpack">Webpack</h3>
171-
<p>There is a plugin available to run TypeDoc with Webpack created by Microsoft. You can find it on NPM:<br>
172-
<a href="https://www.npmjs.com/package/typedoc-webpack-plugin">https://www.npmjs.com/package/typedoc-webpack-plugin</a></p>
173-
<h3 id="gulp">Gulp</h3>
174-
<p>There is a plugin available to run TypeDoc with Gulp created by Rogier Schouten. You can find it on NPM:<br>
175-
<a href="https://www.npmjs.org/package/gulp-typedoc/">https://www.npmjs.org/package/gulp-typedoc/</a></p>
176-
<h3 id="grunt">Grunt</h3>
177-
<p>There is a plugin available to run TypeDoc with Grunt created by Bart van der Schoor. You can find it on NPM:<br>
178-
<a href="https://www.npmjs.org/package/grunt-typedoc">https://www.npmjs.org/package/grunt-typedoc</a></p>
179-
<h2 id="plugins">Plugins</h2>
180-
<ul>
181-
<li><a href="https://github.com/christopherthielen/typedoc-plugin-external-module-name">External Module Name</a> - Set the name of TypeDoc external modules</li>
182-
<li><a href="https://github.com/gdelmas/typedoc-plugin-sourcefile-url">Sourcefile URL</a> - Set custom source file URL links</li>
183-
<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>
184-
<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>
185-
<li><a href="https://github.com/IgniteUI/typedoc-plugin-localization">Localization</a> - Generate documentation for different languages</li>
186-
</ul>
187-
<h2 id="advanced-guides-and-docs">Advanced guides and docs</h2>
188-
<p>Visit our homepage for advanced guides and an extensive API documentation:<br>
189-
<a href="http://typedoc.org">http://typedoc.org</a></p>
190-
<h2 id="contributing">Contributing</h2>
191-
<p>This project is maintained by a community of developers. Contributions are welcome and appreciated.
192-
You can find TypeDoc on GitHub; feel free to start an issue or create a pull requests:<br>
193-
<a href="https://github.com/TypeStrong/typedoc">https://github.com/TypeStrong/typedoc</a></p>
194-
<p>For more information, read the <a href="https://github.com/TypeStrong/typedoc/contributing.md">contribution guide</a>.</p>
195-
<h2 id="license">License</h2>
196-
<p>Copyright (c) 2015 <a href="http://typedoc.org">Sebastian Lenz</a>.<br>
197-
Copyright (c) 2016-2018 <a href="https://github.com/TypeStrong/typedoc/graphs/contributors">TypeDoc Contributors</a>.<br>
198-
Licensed under the Apache License 2.0.</p>
19984
</div>
20085
</div>
20186
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">

0 commit comments

Comments
 (0)