From 276bad6919be6a8de39fc33f02a523911da72f16 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 24 Jun 2012 17:14:56 +0200 Subject: [PATCH] update oxdoc article --- readme/{documentation.html => oxdoc.html} | 25 +++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) rename readme/{documentation.html => oxdoc.html} (53%) diff --git a/readme/documentation.html b/readme/oxdoc.html similarity index 53% rename from readme/documentation.html rename to readme/oxdoc.html index 6ea41c83..df9681c9 100644 --- a/readme/documentation.html +++ b/readme/oxdoc.html @@ -1,31 +1,34 @@ -

OxDoc - A JavaScript Documentation Language

+

OxDoc — A JavaScript Documentation Language

-

Nothing to see here yet, please move along...

+

OxDoc is a new format for JavaScript documentation. It was developed for and is used throughout OxJS, which provides a parser and a browser for it.

-
+

OxDoc itself isn't formally documented yet, but you may want to take a look at the extensive tutorial. The sample below should give you a rough first idea.

+ +

For now, OxDoc should be considered a proposal, and this introduction is, above all, a request for comments.

+ +
 //@ 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'