update oxdoc article
This commit is contained in:
parent
e0b1c238b9
commit
276bad6919
1 changed files with 14 additions and 11 deletions
|
@ -1,31 +1,34 @@
|
|||
<h1>OxDoc - A JavaScript Documentation Language</h1>
|
||||
<h1>OxDoc — A JavaScript Documentation Language</h1>
|
||||
|
||||
<p>Nothing to see here yet, please move along...</p>
|
||||
<p><code>OxDoc</code> is a new format for JavaScript documentation. It was developed for and is used throughout <code>OxJS</code>, which provides a <a href="#doc/Ox.doc">parser</a> and a <a href="#doc/Ox.DocPanel">browser</a> for it.</p>
|
||||
|
||||
<pre class="code" id="doc">
|
||||
<p><code>OxDoc</code> itself isn't formally documented yet, but you may want to take a look at the extensive <a href="#examples/oxdoc_tutorial">tutorial</a>. The sample below should give you a rough first idea.</p>
|
||||
|
||||
<p>For now, <code>OxDoc</code> should be considered a proposal, and this introduction is, above all, a request for <a href="#development">comments</a>.</p>
|
||||
|
||||
<pre class="code">
|
||||
//@ Section Name
|
||||
My = {};
|
||||
this.My = {};
|
||||
//@ My.foo <number> One-line summary, with *some* `markdown`
|
||||
My.foo = 23;
|
||||
/*@
|
||||
My.bar <object> Summary
|
||||
Optional multi-line description, with *some* `markdown`.
|
||||
property <object> A property of My.bar
|
||||
Description
|
||||
property <object> A property of `My.bar`
|
||||
Description of `property`.
|
||||
foo <number> A number
|
||||
bar <[string]> An array of strings
|
||||
method <function> A method of My.bar
|
||||
method <function> A method of `My.bar`
|
||||
(foo[, bar], callback) -> <undefined> Return value
|
||||
foo <number|string> Argument, number or string
|
||||
bar <boolean|false> Optional argument, default is `false`
|
||||
callback <function> Callback function
|
||||
arg <boolean> Argument
|
||||
baz <event> An event triggered by My.bar
|
||||
baz <event> An event triggered by `My.bar`
|
||||
x <number> Event property
|
||||
y <number> Event property
|
||||
# This is a comment. Below are inline tests (the first one will fail, the
|
||||
# last one is asynchronous).
|
||||
> My.bar.property.foo > 1
|
||||
# This is a comment. Below are inline tests. The last one is asynchronous.
|
||||
> My.bar.property.foo < 1
|
||||
true
|
||||
> My.bar.property.bar.join('')
|
||||
'string'
|
Loading…
Reference in a new issue