Permalink
Browse files

Updated some documentation

  • Loading branch information...
1 parent 567662d commit 1b48027608cf0bd49664ccc01d3a1b9579408fda @davglass committed May 10, 2012
Showing with 29 additions and 7 deletions.
  1. +22 −2 lib/help.js
  2. +5 −3 lib/index.js
  3. +1 −1 lib/server.js
  4. +1 −1 lib/utils.js
View
@@ -4,7 +4,19 @@ Code licensed under the BSD License:
http://yuilibrary.com/license/
*/
YUI.add('help', function(Y) {
+
+ /**
+ * Shows the help text
+ * @module yuidoc
+ * @class Help
+ */
+ /**
+ * The help text to display
+ * @private
+ * @property help
+ * @type Array
+ */
var help = [
"",
"YUI Doc generates API documentation from a modified JavaDoc syntax.",
@@ -40,13 +52,21 @@ YUI.add('help', function(Y) {
" <input path> Supply a list of paths (shell globbing is handy here)",
"",
].join('\n');
-
+
+ /**
+ * Render the help message as a string
+ * @method renderHelp
+ * @return {String} The help screen to display
+ */
Y.renderHelp = function() {
return Y.Lang.sub(help, {
VERSION: Y.packageInfo.version
});
};
-
+ /**
+ * Display the help message, write it to the screen and exit
+ * @method showHelp
+ */
Y.showHelp = function() {
console.error(Y.renderHelp());
process.exit(0); //Shouldn't exit one on help
View
@@ -16,7 +16,7 @@ You can use it like this:
var Y = require('yuidoc');
var json = (new Y.YUIDoc(options)).run();
-@class index
+@class Index
@exports {YUI} Y A YUI instance
@module yuidoc
*/
@@ -54,6 +54,9 @@ var Y = YUI({
help: {
fullpath: path.join(__dirname, 'help.js')
},
+ options: {
+ fullpath: path.join(__dirname, 'options.js')
+ },
docparser: {
fullpath: path.join(__dirname, 'docparser.js'),
requires: ['base-base', 'json-stringify']
@@ -88,9 +91,8 @@ var Y = YUI({
loader: true
},
useSync: true
-}).use('docparser', 'yuidoc', 'utils', 'doc-builder', 'docview', 'files', 'help', 'server', 'project');
+}).use('docparser', 'yuidoc', 'utils', 'doc-builder', 'docview', 'files', 'help', 'options', 'server', 'project');
Y.packageInfo = Y.Files.getJSON(metaPath);
-
module.exports = Y;
View
@@ -3,7 +3,7 @@ YUI.add('server', function(Y) {
/**
* Provides the `--server` server option for YUIDoc
* @class Server
- * @module server
+ * @module yuidoc
*/
var Server = {
/**
View
@@ -10,7 +10,7 @@ var path = require('path'),
/**
* Utilities Class
-* @class utils
+* @class Utils
* @module yuidoc
*/

0 comments on commit 1b48027

Please sign in to comment.