From 0689af6f8c30256ede4e0ef3d8dd3ba913989c0b Mon Sep 17 00:00:00 2001 From: Ashley Kyd Date: Fri, 31 Jan 2014 16:26:57 +1000 Subject: [PATCH] Added more detailed param info to actions.js --- lib/actions/actions.js | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/lib/actions/actions.js b/lib/actions/actions.js index 2c0de1a3..d616af77 100644 --- a/lib/actions/actions.js +++ b/lib/actions/actions.js @@ -71,8 +71,8 @@ actions._prepCopy = function _prepCopy(source, destination, process) { * `copy`, `template` (only when could be applied/required by legacy code), * `write` and alike consider. * - * @param {String} source - * @param {String} destination + * @param {String} source Source file to copy from. Relative to this.sourceRoot() + * @param {String} destination Destination file to write to. Relative to this.destinationRoot() * @param {Function} process */ @@ -124,11 +124,12 @@ actions.copy = function copy(source, destination, process) { * https://github.com/yeoman/generator/pull/359 * https://github.com/yeoman/generator/issues/350 * - * An optimized copy method for larger file trees. Does not do - * full conflicter checks, only check ir root directory is not empty. + * A copy method skiping templating and conflict checking. It will allow copying + * a large amount of files without causing too much recursion errors. You should + * never use this method, unless there's no other solution. * - * @param {String} source - * @param {String} destination + * @param {String} source Source file to copy from. Relative to this.sourceRoot() + * @param {String} destination Destination file to write to. Relative to this.destinationRoot() * @param {Function} process */ @@ -163,7 +164,7 @@ actions.bulkCopy = function bulkCopy(source, destination, process) { * encoding or null. Non absolute path are prefixed by the source root. * * @param {String} filepath - * @param {String} encoding + * @param {String} [encoding="utf-8"] Character encoding. */ actions.read = function read(filepath, encoding) { @@ -269,10 +270,10 @@ actions.checkForCollision = function checkForCollision(filepath, content, cb) { * * use options to pass parameters to engine (like _.templateSettings) * - * @param {String} source - * @param {String} destination - * @param {Object} data - * @param {Object} options + * @param {String} source Source file to read from. Relative to this.sourceRoot() + * @param {String} destination Destination file to write to. Relative to this.destinationRoot(). + * @param {Object} data Hash to pass to the template. Leave undefined to use the generator instance context. + * @param {Object} options */ actions.template = function template(source, destination, data, options) { @@ -345,8 +346,8 @@ actions._directory = function _directory(source, destination, process, bulk) { /** * Copies recursively the files from source directory to root directory. * - * @param {String} source - * @param {String} destination + * @param {String} source Source directory to copy from. Relative to this.sourceRoot() + * @param {String} destination Directory to copy the source files into. Relative to this.destinationRoot(). * @param {Function} process */ @@ -357,8 +358,12 @@ actions.directory = function directory(source, destination, process) { /** * Copies recursively the files from source directory to root directory. * - * @param {String} source - * @param {String} destination + * A copy method skiping templating and conflict checking. It will allow copying + * a large amount of files without causing too much recursion errors. You should + * never use this method, unless there's no other solution. + * + * @param {String} source Source directory to copy from. Relative to this.sourceRoot() + * @param {String} destination Directory to copy the source files into.Relative to this.destinationRoot(). * @param {Function} process */