Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update example pages

  • Loading branch information...
commit 2aa5b6124e53de7d0a79642e65267f413e566e58 1 parent 51393ff
Omar Khan authored
159 index.html
View
@@ -0,0 +1,159 @@
+<!doctype html>
+
+<!-- Documentation generated by [CoffeeDoc](http://github.com/omarkhan/coffeedoc) -->
+
+<html>
+<head>
+ <title>CoffeeDoc</title>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <link rel="stylesheet" media="all" href="resources/base.css" />
+</head>
+<body>
+ <header>
+ <h1>CoffeeDoc &mdash; Module Index</h1>
+ </header>
+ <div class="container">
+ <div class="sidebar column">
+ <ul id="modulelist">
+
+ <li><a href="src/coffeedoc.coffee.html">src/coffeedoc.coffee</a></li>
+
+ <li><a href="src/docgen.coffee.html">src/docgen.coffee</a></li>
+
+ <li><a href="src/helpers.coffee.html">src/helpers.coffee</a></li>
+
+ <li><a href="src/parsers.coffee.html">src/parsers.coffee</a></li>
+
+ <li><a href="src/renderers.coffee.html">src/renderers.coffee</a></li>
+
+ </ul>
+ </div>
+ <div class="content column">
+
+ <div class="module">
+ <div class="header">
+ <a href="src/coffeedoc.coffee.html"><h1>coffeedoc.coffee</h1></a>
+ </div>
+ <div class="module-content">
+ <h1>Documentation functions</h1>
+
+<p>These functions extract relevant documentation info from AST nodes as returned
+by the coffeescript parser.</p>
+
+
+ <h3>Functions</h3>
+ <ul class="functionlist">
+
+ <li><a href="src/coffeedoc.coffee.html#documentModule">documentModule(script, parser)</a></li>
+
+ <li><a href="src/coffeedoc.coffee.html#documentClass">documentClass(cls)</a></li>
+
+ <li><a href="src/coffeedoc.coffee.html#documentFunction">documentFunction(func)</a></li>
+
+ <li><a href="src/coffeedoc.coffee.html#formatDocstring">formatDocstring(str)</a></li>
+
+ </ul>
+
+ </div>
+ </div>
+
+ <div class="module">
+ <div class="header">
+ <a href="src/docgen.coffee.html"><h1>docgen.coffee</h1></a>
+ </div>
+ <div class="module-content">
+ <h1>Documentation generator</h1>
+
+<p>This script generates html documentation from a coffeescript source file</p>
+
+
+ <h3>Functions</h3>
+ <ul class="functionlist">
+
+ <li><a href="src/docgen.coffee.html#getSourceFiles">getSourceFiles(target)</a></li>
+
+ </ul>
+
+ </div>
+ </div>
+
+ <div class="module">
+ <div class="header">
+ <a href="src/helpers.coffee.html"><h1>helpers.coffee</h1></a>
+ </div>
+ <div class="module-content">
+ <h1>AST helper functions</h1>
+
+<p>Useful functions for dealing with the CoffeeScript parse tree.</p>
+
+
+ <h3>Functions</h3>
+ <ul class="functionlist">
+
+ <li><a href="src/helpers.coffee.html#exports.getNodes">exports.getNodes(script)</a></li>
+
+ <li><a href="src/helpers.coffee.html#exports.getFullName">exports.getFullName(variable)</a></li>
+
+ <li><a href="src/helpers.coffee.html#exports.getAttr">exports.getAttr(node, path)</a></li>
+
+ </ul>
+
+ </div>
+ </div>
+
+ <div class="module">
+ <div class="header">
+ <a href="src/parsers.coffee.html"><h1>parsers.coffee</h1></a>
+ </div>
+ <div class="module-content">
+ <h1>Syntax tree parsers</h1>
+
+<p>These classes provide provide methods for extracting classes and functions from
+the CoffeeScript AST. Each parser class is specific to a module loading system
+(e.g. CommonJS, RequireJS), and should implement the <code>getDependencies</code>,
+<code>getClasses</code> and <code>getFunctions</code> methods. Parsers are selected via command line
+option.</p>
+
+ <h3>Classes</h3>
+ <ul class="classlist">
+
+ <li><a href="src/parsers.coffee.html#BaseParser">BaseParser</a></li>
+
+ <li><a href="src/parsers.coffee.html#CommonJSParser">CommonJSParser</a></li>
+
+ <li><a href="src/parsers.coffee.html#RequireJSParser">RequireJSParser</a></li>
+
+ </ul>
+
+
+ </div>
+ </div>
+
+ <div class="module">
+ <div class="header">
+ <a href="src/renderers.coffee.html"><h1>renderers.coffee</h1></a>
+ </div>
+ <div class="module-content">
+
+
+ <h3>Classes</h3>
+ <ul class="classlist">
+
+ <li><a href="src/renderers.coffee.html#Renderer">Renderer</a></li>
+
+ <li><a href="src/renderers.coffee.html#HtmlRenderer">HtmlRenderer</a></li>
+
+ <li><a href="src/renderers.coffee.html#GithubWikiRenderer">GithubWikiRenderer</a></li>
+
+ <li><a href="src/renderers.coffee.html#JSONRenderer">JSONRenderer</a></li>
+
+ </ul>
+
+
+ </div>
+ </div>
+
+ </div>
+ </div>
+</body>
+</html>
326 resources/base.css
View
@@ -1,70 +1,278 @@
-body {
- font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
- font-size: 15px;
- line-height: 22px;
- color: #444;
- margin: 0;
- padding: 0;
-}
+/*
+ * Skeleton V1.1
+ * Copyright 2011, Dave Gamache
+ * www.getskeleton.com
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+ * 8/17/2011
+ */
+
+
+/* #Reset & Basics (Inspired by E. Meyers)
+================================================== */
+ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline; }
+ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
+ display: block; }
+ body {
+ line-height: 1; }
+ ol, ul {
+ list-style: none; }
+ blockquote, q {
+ quotes: none; }
+ blockquote:before, blockquote:after,
+ q:before, q:after {
+ content: '';
+ content: none; }
+ table {
+ border-collapse: collapse;
+ border-spacing: 0; }
+
+
+/* #Basic Styles
+================================================== */
+ body {
+ background: #fff;
+ font: 14px/21px "Helvetica Neue", Helvetica, Arial, sans-serif;
+ color: #444;
+ -webkit-font-smoothing: antialiased; /* Fix for webkit rendering */
+ -webkit-text-size-adjust: 100%;
+ }
+
+
+/* #Typography
+================================================== */
+ h1, h2, h3, h4, h5, h6 {
+ font-family: "Georgia", serif;
+ font-weight: normal; }
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { font-weight: inherit; }
+ h1 { font-size: 34px; line-height: 50px; margin-bottom: 14px;}
+ h2 { font-size: 28px; line-height: 40px; margin-bottom: 10px; }
+ h3 { font-size: 23px; line-height: 34px; margin-bottom: 8px; }
+ h4 { font-size: 19px; line-height: 30px; margin-bottom: 4px; }
+ h5 { font-size: 16px; line-height: 24px; }
+ h6 { font-size: 14px; line-height: 21px; }
+
+ p { margin: 0 0 20px 0; }
+ p img { margin: 0; }
+
+ em { font-style: italic; }
+ strong { font-weight: bold; color: #333; }
+ small { font-size: 80%; }
+
+/* Blockquotes */
+ blockquote, blockquote p { font-size: 17px; line-height: 24px; color: #777; font-style: italic; }
+ blockquote { margin: 0 0 20px; padding: 9px 20px 0 19px; border-left: 1px solid #ddd; }
+ blockquote cite { display: block; font-size: 12px; color: #555; }
+ blockquote cite:before { content: "\2014 \0020"; }
+ blockquote cite a, blockquote cite a:visited, blockquote cite a:visited { color: #555; }
+
+ hr { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 10px 0 30px; height: 0; }
+
+
+/* #Links
+================================================== */
+ a, a:visited {
+ color: #2d81c5;
+ text-decoration: none; outline: 0;
+ -webkit-transition: color 250ms ease-in-out;
+ -moz-transition: color 250ms ease-in-out;
+ transition: color 250ms ease-in-out;
+ }
+ a:hover, a:focus {
+ color: #2569a0;
+ }
+ p a, p a:visited { line-height: inherit; }
+
+
+/* #Lists
+================================================== */
+ ul, ol { margin-bottom: 20px; }
+ ul { list-style: none outside; }
+ ol { list-style: decimal; }
+ ol, ul.square, ul.circle, ul.disc { margin-left: 30px; }
+ ul.square { list-style: square outside; }
+ ul.circle { list-style: circle outside; }
+ ul.disc { list-style: disc outside; }
+ ul ul, ul ol,
+ ol ol, ol ul { margin: 4px 0 5px 30px; font-size: 90%; }
+ ul ul li, ul ol li,
+ ol ol li, ol ul li { margin-bottom: 6px; }
+ li { line-height: 18px; margin-bottom: 12px; }
+ ul.large li { line-height: 21px; }
+ li p { line-height: 21px; }
+
+
+/* #Images
+================================================== */
+
+ img.scale-with-grid {
+ max-width: 100%;
+ height: auto; }
+
+
+/* #Misc
+================================================== */
+ .remove-bottom { margin-bottom: 0 !important; }
+ .half-bottom { margin-bottom: 10px !important; }
+ .add-bottom { margin-bottom: 20px !important; }
+
+
+/* #Base 960 Grid
+================================================== */
+
+ .container { position: relative; width: 960px; margin: 0 auto; padding: 0; }
+ .container .column { float: left; display: inline; margin-left: 10px; margin-right: 10px; }
+ .row { margin-bottom: 20px; }
+
+ /* Base Grid */
+ .container .sidebar.column { width: 220px; }
+ .container .content.column { width: 700px; }
+
+
+/* #Tablet (Portrait)
+================================================== */
+
+ /* Note: Design for a width of 768px */
+
+ @media only screen and (min-width: 768px) and (max-width: 959px) {
+ .container { width: 768px; }
+ .container .column { margin-left: 10px; margin-right: 10px; }
+
+ .container .sidebar.column { width: 172px; }
+ .container .content.column { width: 556px; }
+ }
+
+
+/* #Mobile (Portrait)
+================================================== */
+
+ /* Note: Design for a width of 320px */
+
+ @media only screen and (max-width: 767px) {
+ .container { width: 300px; }
+ .container .column { margin: 0; }
+
+ .container .sidebar.column,
+ .container .content.column { width: 300px; }
+ }
+
+
+/* #Mobile (Landscape)
+================================================== */
+
+ /* Note: Design for a width of 480px */
+
+ @media only screen and (min-width: 480px) and (max-width: 767px) {
+ .container { width: 420px; }
+ .container .column { margin: 0; }
+
+ .container .sidebar.column,
+ .container .content.column { width: 420px; }
+ }
+
+
+/* #Clearing
+================================================== */
+
+ /* Self Clearing Goodness */
+ .container:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; }
+
+
+/* #CoffeeDoc styles
+================================================== */
+
code {
- padding: 2px 4px;
- border: 1px solid #ccc;
- background: #eee;
- font-size: 12px; line-height: 18px;
- font-family: Monaco, Consolas, "Lucida Console", monospace;
- border-radius: 2px;
+ padding: 2px 4px;
+ border: 1px solid #ccc;
+ background: #eee;
+ font-size: 12px; line-height: 18px;
+ font-family: Monaco, Consolas, "Lucida Console", monospace;
+ border-radius: 2px;
}
-
pre {
- padding: 10px;
- border: 1px solid #ccc;
- background: #eee;
- border-radius: 4px;
+ padding: 10px;
+ margin-bottom: 20px;
+ border: 1px solid #ccc;
+ background: #eee;
+ border-radius: 4px;
}
-
pre code {
- border: 0;
- background: none;
- border-radius: 0;
- padding: 0;
+ border: 0;
+ background: none;
+ border-radius: 0;
+ padding: 0;
+}
+header {
+ width: 100%;
+ border-bottom: 1px solid #bbb;
+ margin-bottom: 20px;
+ background-image: -webkit-linear-gradient(top, #fff, #d0d0d0);
+ background-image: -moz-linear-gradient(top, #fff, #d0d0d0);
+ background-image: linear-gradient(top, #fff, #d0d0d0);
}
+header h1 {
+ margin: 0;
+ line-height: 50px;
+ font-size: 20px;
+ text-align: center;
+}
+h1, h2 {
+ border-bottom: 1px solid #ccc;
+}
+h3 {
+ border-bottom: 1px solid #ddd;
+}
+
-a, a:visited {
- color: #444;
- text-decoration: none;
+/* #Module index
+================================================== */
+
+.module {
+ margin-bottom: 25px;
}
-a:hover {
- color: #666;
+.module .header h1 {
+ margin-bottom: 20px;
+ border-bottom: none;
+ box-shadow: 0 5px 5px -5px rgba(45, 129, 197, 0.4);
+ -webkit-transition: box-shadow 250ms ease-in-out;
+ -moz-transition: box-shadow 250ms ease-in-out;
+ transition: box-shadow 250ms ease-in-out;
}
-header {
- width: 100%;
- background-color: #eef;
- border-bottom: 1px solid #ccd;
+.module .header h1:hover {
+ box-shadow: 0 5px 5px -5px rgb(45, 129, 197);
}
-header h1 {
- margin: 0;
- padding: 20px;
- color: #667;
-}
-#content {
- display: table;
-}
-#sidebar {
- display: table-cell;
- background-color: #f4f4ff;
- padding: 10px;
- border-right: 1px dotted #ccd;
- min-width: 150px;
-}
-#main {
- width: 650px;
- display: table-cell;
- padding: 20px;
-}
-#content > div {
- border-bottom: 1px dotted #ccd;
-}
-.classlist, .functionlist {
- list-style-type: none;
- padding-left: 5px;
+.module-content h1 {
+ font-size: 30px;
+ line-height: 44px;
+}
+
+
+/* #Module pages
+================================================== */
+
+.function, .class {
+ margin-bottom: 30px;
+}
+.method {
+ margin-bottom: 20px;
+}
+.class .header {
+ border-bottom: 1px solid #ccc;
+ margin-bottom: 10px;
+}
+.class .header h3 {
+ display: inline;
+ border: none;
+}
+.class .header .parent {
+ color: #aaa;
+}
+.class .header .parent:hover {
+ color: #2569a0;
}
1  resources/index.css
View
@@ -0,0 +1 @@
+undefined
25 resources/module.css
View
@@ -1,24 +1 @@
-div.class, div.function {
- background-color: #eef;
- margin-bottom: 15px;
- border-radius: 8px;
- border: 1px solid #ccd;
-}
-div.class > div, div.function > div {
- padding: 10px;
- margin: 0;
-}
-div.class .header, div.function .header {
- background-color: #ddf;
- border-radius: 7px;
-}
-div.header h3 {
- display: inline;
-}
-a.parent {
- color: #779;
-}
-div.method {
- padding: 0 10px;
- border-top: 1px solid #ccd;
-}
+undefined
26 coffeedoc.html → src/coffeedoc.coffee.html
View
@@ -1,37 +1,38 @@
-<!DOCTYPE html>
+<!doctype html>
+
+<!-- Documentation generated by [CoffeeDoc](http://github.com/omarkhan/coffeedoc) -->
<html>
<head>
<title>coffeedoc.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <link rel="stylesheet" media="all" href="resources/base.css" />
- <link rel="stylesheet" media="all" href="resources/module.css" />
+ <link rel="stylesheet" media="all" href="../resources/base.css" />
</head>
<body>
<header>
<h1>coffeedoc.coffee</h1>
</header>
- <div id="content">
- <div id="sidebar">
+ <div class="container">
+ <div class="sidebar column">
<h4>Functions</h4>
<ul class="functionlist">
- <li><a href="#exports.documentModule">exports.documentModule</a></li>
+ <li><a href="#documentModule">documentModule</a></li>
<li><a href="#documentClass">documentClass</a></li>
<li><a href="#documentFunction">documentFunction</a></li>
- <li><a href="#removeLeadingWhitespace">removeLeadingWhitespace</a></li>
+ <li><a href="#formatDocstring">formatDocstring</a></li>
</ul>
</div>
- <div id="main">
+ <div class="content column">
- <div id="module_docstring">
+ <div id="module-docstring">
<h1>Documentation functions</h1>
<p>These functions extract relevant documentation info from AST nodes as returned
@@ -45,7 +46,7 @@
<div class="function">
<div class="header">
- <a id="exports.documentModule"><h3>exports.documentModule(script, parser)</h3></a>
+ <a id="documentModule"><h3>documentModule(script, parser)</h3></a>
</div>
<div>
@@ -105,12 +106,13 @@
<div class="function">
<div class="header">
- <a id="removeLeadingWhitespace"><h3>removeLeadingWhitespace(str)</h3></a>
+ <a id="formatDocstring"><h3>formatDocstring(str)</h3></a>
</div>
<div>
<p>Given a string, returns it with leading whitespace removed but with
-indentation preserved</p>
+indentation preserved. Replaces <code>\#</code> with <code>#</code> to allow for the use of
+multiple <code>#</code> characters in markup languages (e.g. Markdown headers)</p>
</div>
</div>
52 src/docgen.coffee.html
View
@@ -0,0 +1,52 @@
+<!doctype html>
+
+<!-- Documentation generated by [CoffeeDoc](http://github.com/omarkhan/coffeedoc) -->
+
+<html>
+<head>
+ <title>docgen.coffee</title>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <link rel="stylesheet" media="all" href="../resources/base.css" />
+</head>
+<body>
+ <header>
+ <h1>docgen.coffee</h1>
+ </header>
+ <div class="container">
+ <div class="sidebar column">
+
+
+ <h4>Functions</h4>
+ <ul class="functionlist">
+
+ <li><a href="#getSourceFiles">getSourceFiles</a></li>
+
+ </ul>
+
+ </div>
+ <div class="content column">
+
+ <div id="module-docstring">
+ <h1>Documentation generator</h1>
+
+<p>This script generates html documentation from a coffeescript source file</p>
+ </div>
+
+
+
+ <div id="functions">
+ <h2>Functions</h2>
+
+ <div class="function">
+ <div class="header">
+ <a id="getSourceFiles"><h3>getSourceFiles(target)</h3></a>
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+</body>
+</html>
86 src/helpers.coffee.html
View
@@ -0,0 +1,86 @@
+<!doctype html>
+
+<!-- Documentation generated by [CoffeeDoc](http://github.com/omarkhan/coffeedoc) -->
+
+<html>
+<head>
+ <title>helpers.coffee</title>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <link rel="stylesheet" media="all" href="../resources/base.css" />
+</head>
+<body>
+ <header>
+ <h1>helpers.coffee</h1>
+ </header>
+ <div class="container">
+ <div class="sidebar column">
+
+
+ <h4>Functions</h4>
+ <ul class="functionlist">
+
+ <li><a href="#exports.getNodes">exports.getNodes</a></li>
+
+ <li><a href="#exports.getFullName">exports.getFullName</a></li>
+
+ <li><a href="#exports.getAttr">exports.getAttr</a></li>
+
+ </ul>
+
+ </div>
+ <div class="content column">
+
+ <div id="module-docstring">
+ <h1>AST helper functions</h1>
+
+<p>Useful functions for dealing with the CoffeeScript parse tree.</p>
+ </div>
+
+
+
+ <div id="functions">
+ <h2>Functions</h2>
+
+ <div class="function">
+ <div class="header">
+ <a id="exports.getNodes"><h3>exports.getNodes(script)</h3></a>
+ </div>
+
+ <div>
+ <p>Generates the AST from coffeescript source code. Adds a 'type' attribute
+to each node containing the name of the node's constructor, and returns
+the expressions array</p>
+ </div>
+
+ </div>
+
+ <div class="function">
+ <div class="header">
+ <a id="exports.getFullName"><h3>exports.getFullName(variable)</h3></a>
+ </div>
+
+ <div>
+ <p>Given a variable node, returns its full name</p>
+ </div>
+
+ </div>
+
+ <div class="function">
+ <div class="header">
+ <a id="exports.getAttr"><h3>exports.getAttr(node, path)</h3></a>
+ </div>
+
+ <div>
+ <p>Safe function for looking up paths in the AST. If an attribute is
+undefined at any part of the path, an object with is returned with the
+type attribute set to null</p>
+ </div>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+</body>
+</html>
254 src/parsers.coffee.html
View
@@ -0,0 +1,254 @@
+<!doctype html>
+
+<!-- Documentation generated by [CoffeeDoc](http://github.com/omarkhan/coffeedoc) -->
+
+<html>
+<head>
+ <title>parsers.coffee</title>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <link rel="stylesheet" media="all" href="../resources/base.css" />
+</head>
+<body>
+ <header>
+ <h1>parsers.coffee</h1>
+ </header>
+ <div class="container">
+ <div class="sidebar column">
+
+ <h4>Classes</h4>
+ <ul class="classlist">
+
+ <li><a href="#BaseParser">BaseParser</a></li>
+
+ <li><a href="#CommonJSParser">CommonJSParser</a></li>
+
+ <li><a href="#RequireJSParser">RequireJSParser</a></li>
+
+ </ul>
+
+
+ </div>
+ <div class="content column">
+
+ <div id="module-docstring">
+ <h1>Syntax tree parsers</h1>
+
+<p>These classes provide provide methods for extracting classes and functions from
+the CoffeeScript AST. Each parser class is specific to a module loading system
+(e.g. CommonJS, RequireJS), and should implement the <code>getDependencies</code>,
+<code>getClasses</code> and <code>getFunctions</code> methods. Parsers are selected via command line
+option.</p>
+ </div>
+
+
+ <div id="classes">
+ <h2>Classes</h2>
+
+ <div class="class">
+ <div class="header">
+ <a id="BaseParser"><h3>BaseParser</h3></a>
+
+ </div>
+ <div class="class-content">
+ <p>This base class defines the interface for parsers. Subclasses should
+implement these methods.</p>
+ <div class="methods">
+
+
+ <div class="instancemethods">
+ <h3>Instance Methods</h3>
+
+ <div class="method">
+ <h4>getDependencies(nodes)</h4>
+ <p>Parse require statements and return a hash of module
+dependencies of the form:</p>
+
+<pre><code>{
+ "local.name": "path/to/module"
+}
+</code></pre>
+ </div>
+
+ <div class="method">
+ <h4>getClasses(nodes)</h4>
+ <p>Return an array of class nodes. Be sure to include classes that are
+assigned to variables, e.g. <code>exports.MyClass = class MyClass</code></p>
+ </div>
+
+ <div class="method">
+ <h4>getFunctions(nodes)</h4>
+ <p>Return an array of function nodes.</p>
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+ <div class="class">
+ <div class="header">
+ <a id="CommonJSParser"><h3>CommonJSParser</h3></a>
+
+
+ <a class="parent" href="#BaseParser"><h3>extends BaseParser</h3></a>
+
+
+ </div>
+ <div class="class-content">
+ <p>Parses code written according to CommonJS specifications:</p>
+
+<pre><code>require("module")
+exports.func = -&gt;
+</code></pre>
+ <div class="methods">
+
+
+ <div class="instancemethods">
+ <h3>Instance Methods</h3>
+
+ <div class="method">
+ <h4>getDependencies(nodes)</h4>
+ <p>This currently works with the following <code>require</code> calls:</p>
+
+<pre><code>local_name = require("path/to/module")
+</code></pre>
+
+<p>or</p>
+
+<pre><code>local_name = require(__dirname + "/path/to/module")
+</code></pre>
+ </div>
+
+ <div class="method">
+ <h4>getClasses(nodes)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>getFunctions(nodes)</h4>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+ <div class="class">
+ <div class="header">
+ <a id="RequireJSParser"><h3>RequireJSParser</h3></a>
+
+
+ <a class="parent" href="#BaseParser"><h3>extends BaseParser</h3></a>
+
+
+ </div>
+ <div class="class-content">
+ <p>Not yet tested</p>
+ <div class="methods">
+
+
+ <div class="instancemethods">
+ <h3>Instance Methods</h3>
+
+ <div class="method">
+ <h4>getNodes(nodes, debug)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>_parseCall(node, deps)</h4>
+ <p>Parse require([], ->) and define([], ->) </p>
+ </div>
+
+ <div class="method">
+ <h4>_parseAssign(node, deps)</h4>
+ <p>Parse module = require("path/to/module") </p>
+ </div>
+
+ <div class="method">
+ <h4>_parseObject(node, deps)</h4>
+ <p>Parse require = {} </p>
+ </div>
+
+ <div class="method">
+ <h4>_matchArgs(deps, mods, args)</h4>
+ <p>Match the list of modules to the list of local variable names and
+add them to the dependencies object given.</p>
+ </div>
+
+ <div class="method">
+ <h4>_stripQuotes(str)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>_parseFuncArgs(func)</h4>
+ <p>Given a node of type 'Code', gathers the names of each of the function
+arguments and return them in an array.</p>
+ </div>
+
+ <div class="method">
+ <h4>_parseModuleArray(arr)</h4>
+ <p>Given a node of type 'Arr', gathers the module paths represented by
+each object in the array and returns them in an array.</p>
+ </div>
+
+ <div class="method">
+ <h4>_getModulePath(mod)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>getDependencies(nodes)</h4>
+ <p>This currently works with the following <code>require</code> calls:</p>
+
+<pre><code>local_name = require("path/to/module")
+local_name = require(__dirname + "/path/to/module")
+</code></pre>
+
+<p>The following <code>require</code> object assignments:</p>
+
+<pre><code>require = {deps: ["path/to/module"]}
+require = {deps: ["path/to/module"], callback: (module) -&gt;}
+</code></pre>
+
+<p>And the following <code>require and</code>define` calls:</p>
+
+<pre><code>require(["path/to/module"], (module) -&gt; ...)
+require({}, ["path/to/module"], (module) -&gt; ...)
+define(["path/to/module"], (module) -&gt; ...)
+define('', ["path/to/module"], (module) -&gt; ...)
+</code></pre>
+ </div>
+
+ <div class="method">
+ <h4>getClasses(nodes)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>getObjects(nodes)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>getFunctions(nodes)</h4>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+ </div>
+
+
+ </div>
+ </div>
+</body>
+</html>
276 src/renderers.coffee.html
View
@@ -0,0 +1,276 @@
+<!doctype html>
+
+<!-- Documentation generated by [CoffeeDoc](http://github.com/omarkhan/coffeedoc) -->
+
+<html>
+<head>
+ <title>renderers.coffee</title>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <link rel="stylesheet" media="all" href="../resources/base.css" />
+</head>
+<body>
+ <header>
+ <h1>renderers.coffee</h1>
+ </header>
+ <div class="container">
+ <div class="sidebar column">
+
+ <h4>Classes</h4>
+ <ul class="classlist">
+
+ <li><a href="#Renderer">Renderer</a></li>
+
+ <li><a href="#HtmlRenderer">HtmlRenderer</a></li>
+
+ <li><a href="#GithubWikiRenderer">GithubWikiRenderer</a></li>
+
+ <li><a href="#JSONRenderer">JSONRenderer</a></li>
+
+ </ul>
+
+
+ </div>
+ <div class="content column">
+
+
+ <div id="classes">
+ <h2>Classes</h2>
+
+ <div class="class">
+ <div class="header">
+ <a id="Renderer"><h3>Renderer</h3></a>
+
+ </div>
+ <div class="class-content">
+
+ <div class="methods">
+
+
+ <div class="instancemethods">
+ <h3>Instance Methods</h3>
+
+ <div class="method">
+ <h4>constructor(outputdir, sources)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>preprocess(context)</h4>
+ <p>This method should apply any transformations to module documentation
+before it is passed to the template. Transformations should be made in
+place - the return value is ignored.</p>
+ </div>
+
+ <div class="method">
+ <h4>renderIndex(modules)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>renderModule(context)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>shouldMakeSubdirs()</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>moduleFilename(x)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>finish()</h4>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+ <div class="class">
+ <div class="header">
+ <a id="HtmlRenderer"><h3>HtmlRenderer</h3></a>
+
+
+ <a class="parent" href="#Renderer"><h3>extends Renderer</h3></a>
+
+
+ </div>
+ <div class="class-content">
+
+ <div class="methods">
+
+
+ <div class="instancemethods">
+ <h3>Instance Methods</h3>
+
+ <div class="method">
+ <h4>constructor(outputdir, sources)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>_renderMarkdown(obj)</h4>
+ <p>Helper function that transforms markdown docstring within an AST node
+into html, in place</p>
+ </div>
+
+ <div class="method">
+ <h4>preprocess(context)</h4>
+ <p>Convert markdown to html.</p>
+ </div>
+
+ <div class="method">
+ <h4>moduleFilename(x)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>finish()</h4>
+ <p>Writes CSS files out to resources</p>
+ </div>
+
+ <div class="method">
+ <h4>fileExtension()</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>indexFile()</h4>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+ <div class="class">
+ <div class="header">
+ <a id="GithubWikiRenderer"><h3>GithubWikiRenderer</h3></a>
+
+
+ <a class="parent" href="#Renderer"><h3>extends Renderer</h3></a>
+
+
+ </div>
+ <div class="class-content">
+
+ <div class="methods">
+
+
+ <div class="instancemethods">
+ <h3>Instance Methods</h3>
+
+ <div class="method">
+ <h4>constructor(outputdir, sources)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>_wikiize(path)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>_quoteMarkdown(t)</h4>
+ <p>Its more than possible that a function name will have underscores... quote them.</p>
+ </div>
+
+ <div class="method">
+ <h4>_params(t)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>moduleFilename(x)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>preprocess(context)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>fileExtension()</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>indexFile()</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>shouldMakeSubdirs()</h4>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+ <div class="class">
+ <div class="header">
+ <a id="JSONRenderer"><h3>JSONRenderer</h3></a>
+
+
+ <a class="parent" href="#Renderer"><h3>extends Renderer</h3></a>
+
+
+ </div>
+ <div class="class-content">
+
+ <div class="methods">
+
+
+ <div class="instancemethods">
+ <h3>Instance Methods</h3>
+
+ <div class="method">
+ <h4>constructor(outputdir, sources)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>shouldMakeSubdirs()</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>moduleFilename(x)</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>fileExtension()</h4>
+
+ </div>
+
+ <div class="method">
+ <h4>indexFile()</h4>
+
+ </div>
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+ </div>
+
+
+ </div>
+ </div>
+</body>
+</html>
41 example.html → test/example.coffee.html
View
@@ -1,18 +1,19 @@
-<!DOCTYPE html>
+<!doctype html>
+
+<!-- Documentation generated by [CoffeeDoc](http://github.com/omarkhan/coffeedoc) -->
<html>
<head>
<title>example.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <link rel="stylesheet" media="all" href="resources/base.css" />
- <link rel="stylesheet" media="all" href="resources/module.css" />
+ <link rel="stylesheet" media="all" href="../resources/base.css" />
</head>
<body>
<header>
<h1>example.coffee</h1>
</header>
- <div id="content">
- <div id="sidebar">
+ <div class="container">
+ <div class="sidebar column">
<h4>Classes</h4>
<ul class="classlist">
@@ -30,13 +31,13 @@
</ul>
</div>
- <div id="main">
+ <div class="content column">
- <div id="module_docstring">
+ <div id="module-docstring">
<h1>CoffeeDoc example documentation</h1>
<p>This is a module-level docstring, and will be displayed at the top of the module documentation.
-Documentation generated by <a href="http://github.com/omarkhan/coffeedoc">CoffeeDoc</a></p>
+Documentation generated by <a href="http://github.com/omarkhan/coffeedoc">CoffeeDoc</a>.</p>
</div>
@@ -52,19 +53,25 @@
</div>
- <div class="class_content">
+ <div class="class-content">
<p>This docstring documents MyClass. It can include <em>Markdown</em> syntax,
which will be converted to html.</p>
<div class="methods">
- <div class="method">
- <h4>constructor()</h4>
- <p>Constructor documentation goes here. </p>
- </div>
- <div class="method">
- <h4>method(args)</h4>
- <p>This is a method of MyClass </p>
+ <div class="instancemethods">
+ <h3>Instance Methods</h3>
+
+ <div class="method">
+ <h4>constructor(@args)</h4>
+ <p>Constructor documentation goes here. </p>
+ </div>
+
+ <div class="method">
+ <h4>method(args)</h4>
+ <p>This is a method of MyClass. </p>
+ </div>
+
</div>
</div>
@@ -83,7 +90,7 @@
</div>
<div>
- <p>This function will be documented by CoffeeDoc</p>
+ <p>This function will be documented by CoffeeDoc.</p>
</div>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.