-
Notifications
You must be signed in to change notification settings - Fork 56
/
README.md.html
195 lines (181 loc) · 8.56 KB
/
README.md.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!DOCTYPE html>
<html>
<head>
<title>README.md</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" media="all" href="doc-style.css" />
<script src="doc-filelist.js"></script>
<script>
var relativeDir = "";
var thisFile = "README.md";
var defaultSidebar = true;
</script>
<script src="doc-script.js"></script>
<script src="fileSearch.js"></script>
<link rel="stylesheet" href="fileSearch.css" />
</head>
<body>
<div id="sidebar_wrapper">
<div id="sidebar_switch">
<span class="tree">Files</span>
<span class="headings">Headings</span>
</div>
<div id="tree"></div>
<div id="headings">
<div class="heading h1">
<a href="#docker">Docker</a>
</div>
<div class="heading h2">
<a href="#installation">Installation</a>
</div>
<div class="heading h2">
<a href="#usage">Usage</a>
</div>
<div class="heading h2">
<a href="#examples">Examples</a>
</div>
<div class="heading h3">
<a href="#process-every-file-in-the-current-directory-into-doc">Process every file in the current directory into &quot;doc&quot;</a>
</div>
<div class="heading h3">
<a href="#process-files-in-src-to-documents">Process files in &quot;src&quot; to &quot;documents&quot;</a>
</div>
<div class="heading h3">
<a href="#generate-docker-docs">Generate Docker docs</a>
</div>
<div class="heading h2">
<a href="#extras">Extras</a>
</div>
<div class="heading h2">
<a href="#colour-schemes">Colour Schemes</a>
</div>
<div class="heading h2">
<a href="#important-note">Important note</a>
</div>
</div>
</div>
<div id="sidebar-toggle"></div>
<div id="container">
<div class="docs markdown"><div class="pilwrap" id="docker">
<h1>
<a href="#docker" name="docker" class="pilcrow"></a>
Docker
</h1>
</div>
<p>A documentation generator built on the foundations of <a href="http://jashkenas.github.com/docco/">Docco</a> and <a href="https://github.com/mbrevoort/docco-husky">Docco-Husky</a>.</p>
<p>The support available in Docco and Docco-Husky for larger projects consisting of many hundreds of script files was somewhat lacking, so I decided to create my own.</p>
<p>Take a look at this project's <a href="http://jbt.github.com/docker">public page</a> for an example of what it can do.</p>
<div class="pilwrap" id="installation">
<h2>
<a href="#installation" name="installation" class="pilcrow"></a>
Installation
</h2>
</div>
<p>Simple: <code>npm install -g docker</code></p>
<div class="pilwrap" id="usage">
<h2>
<a href="#usage" name="usage" class="pilcrow"></a>
Usage
</h2>
</div>
<pre><code class="sh">$ docker [options] [files ...]
</code></pre>
<p>Available options are:</p>
<ul>
<li><code>-i</code> or <code>--input_dir</code>: Path to input source directory. Defaults to current directory.</li>
<li><code>-o</code> or <code>--output_dir</code>: Path to output doc directory. Defaults to <code>./doc</code>.</li>
<li><code>-u</code> or <code>--updated_files</code>: If present, only process files that hav been changed.</li>
<li><code>-c</code> or <code>--colour_scheme</code> (yes, I'm British): Colour scheme to use. Colour schemes are as below.</li>
<li><code>-I</code> or <code>--ignore_hidden</code>: Ignore files and directories whose names begin with <code>.</code> or <code>_</code>.</li>
<li><code>-w</code> or <code>--watch</code>: Keep the process running, watch for changes on the directory, and process updated files.</li>
<li><code>-s</code> or <code>--sidebar</code>: Whether or not the sidebar should be opened by default in the output (defaults to yes, can be yes, no, true, false). Value <code>disable</code> will disable the sidebar entirely in the output.</li>
<li><code>-x</code> or <code>--exclude</code>: Comma-separated list of paths to exclude. Supports basic <code>*</code> wildcards too.</li>
<li><code>-n</code> or <code>--line-number</code>: Include line numbers in the output (default is off)</li>
<li><code>-m</code> or <code>--multi_line_only</code>: Whether to process <em>only</em> multi-line comments. (Defaults to false)</li>
<li><code>--js</code>: Specify a comma-separated list of extra javascript files (relative to the current dir) to include</li>
<li><code>--css</code>: Same as for <code>--js</code> but for CSS files</li>
<li><code>--extras</code>: Comma-separated list of optional extras to activate (see below)</li>
</ul>
<p>If no file list is given, docker will run recursively on every file in the current directory</p>
<p>Any of the files given can also be directories, in which case it will recurse into them.</p>
<p>Folder structure inside the input directory is preserved into the output directory and file names are simply appended <code>.html</code> for the doc file</p>
<div class="pilwrap" id="examples">
<h2>
<a href="#examples" name="examples" class="pilcrow"></a>
Examples
</h2>
</div>
<p>If you haven't installed with <code>-g</code> specified, replace <code>docker</code> with something like <code>$(npm root)/docker/docker</code> in all of the examples below.</p>
<div class="pilwrap" id="process-every-file-in-the-current-directory-into-doc">
<h3>
<a href="#process-every-file-in-the-current-directory-into-doc" name="process-every-file-in-the-current-directory-into-doc" class="pilcrow"></a>
Process every file in the current directory into "doc"
</h3>
</div>
<pre><code class="sh">$ docker
</code></pre>
<div class="pilwrap" id="process-files-in-src-to-documents">
<h3>
<a href="#process-files-in-src-to-documents" name="process-files-in-src-to-documents" class="pilcrow"></a>
Process files in "src" to "documents"
</h3>
</div>
<pre><code class="sh">$ docker -i src -o documents
</code></pre>
<p>or:</p>
<pre><code class="sh">$ docker -o documents src
</code></pre>
<p>or:</p>
<pre><code class="sh">$ docker -o documents src/*
</code></pre>
<p>Note that in the first example, the contents of <code>src</code> will be mapped directly into <code>documents</code> whereas in the second and third
examples, the files will be created inside <code>documents/src</code></p>
<div class="pilwrap" id="generate-docker-docs">
<h3>
<a href="#generate-docker-docs" name="generate-docker-docs" class="pilcrow"></a>
Generate Docker docs
</h3>
</div>
<p>This is the command I use to generate <a href="http://jbt.github.com/docker">this project's documentation</a>.</p>
<ul>
<li>Output to a directory on the <code>gh-pages</code> branch of this repo</li>
<li>Use the "manni" colour scheme</li>
<li>Show the sidebar by default</li>
<li>Ignore files starting with <code>_</code> or <code>.</code></li>
<li>Only process updated files</li>
<li>Exclude the node_modules directory</li>
<li>Watch the directory for further changes as the code is updated.</li>
<li>Include the File Search extra</li>
</ul>
<pre><code class="sh">$ docker -o ../docker_gh-pages -c atelier-cave.light <span class="hljs-operator">-s</span> yes -I -u -x node_modules -w --extras fileSearch
</code></pre>
<div class="pilwrap" id="extras">
<h2>
<a href="#extras" name="extras" class="pilcrow"></a>
Extras
</h2>
</div>
<p>The output of Docker is designed to be fairly lightweight, so doesn't include much other than the bare
minimum to power the basic features. Optional extras like file searching and line jumping are therefore
contained in there own files and can be turned on by a specific flag.</p>
<p>If you're viewing this on GitHub, take a look <a href="/jbt/docker/tree/master/extras.html">here</a>; if you're looking
at the Docker output, look <a href="extras/README.md.html">here</a>, for further explanation.</p>
<div class="pilwrap" id="colour-schemes">
<h2>
<a href="#colour-schemes" name="colour-schemes" class="pilcrow"></a>
Colour Schemes
</h2>
</div>
<p>These are the styles available in <code>highlight.js</code>. See the <a href="https://highlightjs.org/static/demo/">highight.js demo</a> for all available options. You should use the name of the CSS file for this option.</p>
<div class="pilwrap" id="important-note">
<h2>
<a href="#important-note" name="important-note" class="pilcrow"></a>
Important note
</h2>
</div>
<p>All files must be inside the input directory (specified by <code>-i</code>) or one of its descendant subdirectories. If they're not then various file paths in the output won't work properly and the file will probably get generated
in the wrong place. Still, it's better than what it used to do, which was to get stuck in an infinite loop.</p>
</div>
</div>
</body>
</html>