UNPKG

documon

Version:

A documentation system for mortals. Use with any language.

200 lines (175 loc) 5.09 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Options</title> <meta name="description" content="more.options"> <!-- 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.options", name: "Options" } </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="options">Options</h1> <p>The following options are available for both Command Line (CLI) and native JS processing: </p> <table> <thead> <tr> <th id="cli_flag">cli flag</th> <th id="js_prop">js prop</th> <th id="default">default</th> <th id="description">description</th> </tr> </thead> <tbody> <tr> <td>-i</td> <td>src</td> <td></td> <td>Path to source file or folder.</td> </tr> <tr> <td>-o</td> <td>out</td> <td>parallel to source folder</td> <td>Path to build docs into.</td> </tr> <tr> <td>-n</td> <td>name</td> <td></td> <td>Name of your project / docs (displayed on the home page)</td> </tr> <tr> <td>-v</td> <td>version</td> <td></td> <td>Version of your project / docs (displayed on the home page)</td> </tr> <tr> <td>-t</td> <td>template</td> <td></td> <td>Path to template folder</td> </tr> <tr> <td>-l</td> <td>launch</td> <td>false</td> <td>Launch docs in browser when done</td> </tr> <tr> <td>-p</td> <td>print</td> <td>false</td> <td>Print activity to the console (verbose).</td> </tr> <tr> <td>-e</td> <td>sourceExt</td> <td>"js"</td> <td>Extension(s) to parse. Space delimit multiple extensions</td> </tr> <tr> <td>-d</td> <td>dumpData</td> <td>false</td> <td>Dumps intermediary data into the "docs/_data" folder.</td> </tr> <tr> <td>-m</td> <td>more</td> <td></td> <td>"More docs" folder containing additional documentation.</td> </tr> <tr> <td>-g</td> <td>ignore</td> <td></td> <td>An array of files/folders to ignore. See "Ignoring Files" section below.</td> </tr> <tr> <td>-a</td> <td>docBegin</td> <td>/**</td> <td>Comment begin string</td> </tr> <tr> <td>-z</td> <td>docEnd</td> <td>*/</td> <td>Comment end string</td> </tr> <tr> <td>-x</td> <td>indexShortcutName</td> <td>__LAUNCH.html</td> <td>Index shortcut name (so the file will appear at the top of the folder list so you don't have to scroll and poke around to find the "index.html" file).</td> </tr> <tr> <td>-q</td> <td>moreQuirkDelimiter</td> <td>.</td> <td>More quirk delimiter. The character(s) use to seperate the "more" page numbering system from page titles.</td> </tr> <tr> <td>-y</td> <td>gati</td> <td></td> <td>Google Analytics Tracking ID. If present pages will include tracking code.</td> </tr> </tbody> </table> <h3 id="using-the-js-prop-in-your-project">Using the "js prop" in your project</h3> <pre><code>var docs = require("documon"); docs({ name : "My Cool Project", version : "1.0", src : "path/to/src", out : "put/docs/here", more : "path/to/more/folder", template : "path/to/template/folder", launch : true, quiet : false, sourceExt : ["js", "jsx", "php"], dumpData : true, ignore : ["**/*.md", "/path/to/example/**"], gati : "UA-106684927-1" });</code></pre> <h3 id="using-the-cli-flags">Using the CLI flags</h3> <pre><code>cd /path/to/documon node ./index.js -l -p -d -i "path/to/src" -o "put/docs/here" -n "My Cool Project" -v "1.0" -t "path/to/template/folder" -e "js jsx php" -m "path/to/more/folder"</code></pre> <h3 id="ignoring-files">Ignoring Files</h3> <p>We're using a simple "indexOf" to match for ignores, which is designed for speed to just deal with file/folder full-path matching, or word matching. Sorry no globs.</p> <p>To include more than one file/folder with CLI, use a semicolon delimted list. </p> <pre><code>node ./index -g "foo; bar"</code></pre></div> </div> <div class="footer">Generated by <a href="http://www.documon.net" target="_blank">Documon</a></div> </body> </html>