Skip to content

Commit

Permalink
Merge pull request #486 from AshKyd/master
Browse files Browse the repository at this point in the history
Added more detailed param info to actions.js
  • Loading branch information
SBoudrias committed Feb 9, 2014
2 parents 8c02a60 + 0689af6 commit e4627d5
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions lib/actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down Expand Up @@ -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
*/

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
*/

Expand All @@ -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
*/

Expand Down

0 comments on commit e4627d5

Please sign in to comment.