Skip to content

Commit

Permalink
Rename processContent/processContentExclude to process/noProcess to m…
Browse files Browse the repository at this point in the history
…atch Grunt API. Closes GH-92.
  • Loading branch information
shama committed Aug 26, 2013
1 parent 1c19192 commit 2d5b340
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions docs/copy-options.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Options

## processContent
## process
Type: `Function(content, srcpath)`

This option is passed to `grunt.file.copy` as an advanced way to control the file contents that are copied.

## processContentExclude
*`processContent` has been renamed to `process` and the option name will be removed in the future.*

## noProcess
Type: `String`

This option is passed to `grunt.file.copy` as an advanced way to control which file contents are processed.

*`processContentExclude` has been renamed to `noProcess` and the option name will be removed in the future.*

## encoding
Type: `String`
Default: `grunt.file.defaultEncoding`
Expand Down
7 changes: 4 additions & 3 deletions tasks/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ module.exports = function(grunt) {

var options = this.options({
encoding: grunt.file.defaultEncoding,
// processContent/processContentExclude deprecated renamed to process/noProcess
processContent: false,
processContentExclude: []
processContentExclude: [],
});

var copyOptions = {
encoding: options.encoding,
process: options.processContent,
noProcess: options.processContentExclude
process: options.process || options.processContent,
noProcess: options.noProcess || options.processContentExclude,
};

grunt.verbose.writeflags(options, 'Options');
Expand Down

0 comments on commit 2d5b340

Please sign in to comment.