documon
Version:
A documentation system for mortals. Use with any language.
115 lines (85 loc) • 3.73 kB
HTML
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Usage</title>
<meta name="description" content="more.usage">
<!-- Normalize -->
<link rel="stylesheet" href="assets/vendor/normalize.css">
<!-- prettify -->
<link rel="stylesheet" href="assets/vendor/prettify/codamike.css">
<script src="assets/vendor/prettify/prettify.js"></script>
<!-- Documon Pages Info. (Used by various classes to identify this page.) -->
<script>
var pageCtx = {
id : "more.usage",
name: "Usage"
}
</script>
<!-- theme
<link rel="stylesheet" href="assets/fonts/Fira_Sans/FiraSans.css">
<link rel="stylesheet" href="assets/fonts/Inconsolata/inconsolata.css">
-->
<link rel="stylesheet" href="assets/css/pages.css">
<script src="assets/js/documon/Storage.js"></script>
<script src="assets/js/documon/Access.js"></script>
<script src="assets/js/documon/Pages.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-106684927-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div class="page">
<div class="more"><h1 id="usage">Usage</h1>
<p>Documon can be used within your existing Javascript-based project, or from the command line via Node (CLI)</p>
<h2 id="project-based-usage">Project-based Usage</h2>
<p>Install Documon:</p>
<pre><code>npm install documon</code></pre>
<p>… then build documentation from within your project using:</p>
<pre><code>var docs = require("documon");
docs({
src : "path/to/src",
out : "put/docs/here",
name : "My Cool Project",
version : "1.0"
});</code></pre>
<h2 id="cli-usage">CLI Usage</h2>
<p>Documon can be run from command line via Node:</p>
<pre><code>cd /path/to/documon
node ./index.js -h
# or (if you're cool)
node ./index -h
# or (if you're really, cool)
node . -h</code></pre>
<p>Point Documon at your source folder:</p>
<pre><code>node ./index.js "/path/to/source"
# Documon generates a "docs" folder parallel
# to your source. In the example above the
# "docs" folder ends up here:
/path/to/docs</code></pre>
<p>To specify the output folder, set the the second argument to the folder</p>
<pre><code>node ./index.js [source] [output]</code></pre>
<p><strong>Example</strong></p>
<pre><code>node ./index.js "/path/to/source" "/path/to/output/folder"
# ... places the "docs" folder here:
"/path/to/output/folder/docs"</code></pre>
<blockquote>
<p>NOTE: For safety measures, a "docs" folder is always generated inside the output folder. Because each time docs are generated, the docs file is emptied. We empty the docs folder to prevent "stragglers" from collecting and building up over time. By creating and managing a "docs" folder, we can prevents wiping out everything within a folder Documon doesn't manage.</p>
</blockquote>
<p>To explicitly set input/output paths, use the following flags</p>
<pre><code>-i - Source file or folder.
-o - Output path.</code></pre>
<p>Example</p>
<pre><code>node ./index.js -i "/path/to/source" -o "/path/to/output/folder"</code></pre>
<p>See the <a href="more.Options">Options</a> for an in-depth look at all available options.</p>
<p>.</p></div>
</div>
<div class="footer">Generated by <a href="http://www.documon.net" target="_blank">Documon</a></div>
</body>
</html>