diff --git a/Makefile b/Makefile index 81124821..d77ee684 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,8 @@ uninstall: rm -fr ~/.node_libraries/dox examples: uninstall install - dox --title "Dox Example" --desc "This is an example using _dox_, how **cool!**" \ - examples/*.js > examples/index.html && open examples/index.html + dox --title "Dox Example" \ + --desc "This is an example using _dox_, how **cool!**" \ + examples/*.js > examples/index.html .PHONY: install uninstall examples \ No newline at end of file diff --git a/examples/foo.js b/examples/foo.js index 4e4c0afd..9d29ea4a 100644 --- a/examples/foo.js +++ b/examples/foo.js @@ -21,16 +21,16 @@ var files = ['foo.js', 'bar.js']; /** * Output contents of _foo.js_ and _bar.js_. * - * # h1 - * ## h2 - * ### h3 - * - * ## WTF: + * ## Stuff: * * This is just a stupid random demo, so... here is a list: * - * - foo.js - * - bar.js + * - a + * * b + * * c + * - d + * - e + * - f * * ## Examples: * @@ -38,6 +38,10 @@ var files = ['foo.js', 'bar.js']; * * Just a [link](http://github.com/visionmedia/dox) to dox's _source_. * + * ## HTML + * + * Is escaped, for example :). + * * @param {String} nothing a string that does nothing * @return {Object} exports for chaining * @api public @@ -46,9 +50,11 @@ var files = ['foo.js', 'bar.js']; var output = exports.output = function(nothing){ for (var i = 0, len = files.length; i < len; ++i) { var file = files[i]; + // Just some stupid comment if (file.match(/\.js$/)) { fs.readFile(file, function(err, str){ if (err) { + // lalalalala throw err; } else { sys.puts(str); diff --git a/examples/index.html b/examples/index.html index a98ffd3f..5d792a83 100644 --- a/examples/index.html +++ b/examples/index.html @@ -15,7 +15,7 @@ text-decoration: underline; color: #19469D; } -h1 { +h1, h2, h3 { margin: 0; padding: 0; } @@ -78,6 +78,7 @@ table#source tr.filename { padding-top: 40px; border-top: 1px solid #E5E5EE; + text-transform: capitalize; } table#source tr.filename td:last-child { font-size: 12px; @@ -86,6 +87,27 @@ margin: 0; padding: 0; } +table#source tr.code h1, +table#source tr.code h2, +table#source tr.code h3 { + margin-top: 30px; + font-family: "Lucida Grande", "Helvetica Nueue", Arial, sans-serif; + font-size: 18px; +} +table#source tr.code h2 { + font-size: 16px; +} +table#source tr.code h3 { + font-size: 14px; +} +table#source tr.code ul { + margin: 5px 0 5px 35px; + padding: 0; +} +table#source tr.code ul li { + margin: 0; + padding: 2px 0; +} code .string { color: #219161; } code .regexp { color: #219161; } code .keyword { color: #954121; } @@ -96,21 +118,24 @@
Dox ExampleThis is an example using _dox_, how **cool!** | ||||||||||||||||||||||
bar | examples/bar.js | |||||||||||||||||||||
Dox ExampleThis is an example using _dox_, how **cool!** | ||||
bar | examples/bar.js | |||
-+ Module dependencies. |
|
|||
-
param: String foo -param: String bar -api: public |
|
|||
-+ Export bar(). |
|
-|||
foo | examples/foo.js | |||
foo | examples/foo.js | |||
-+ Module dependencies. |
|
|||
-+ Files used by exports.output(); |
|
|||
-
Examples:Just a link to dox’s source. -param: String nothing a string that does nothing -return: Object exports for chaining -api: public +HTML+ +Is escaped, for example :). + +
|
|