Skip to content

Commit

Permalink
Add new option log
Browse files Browse the repository at this point in the history
The default is set as true.

This is so a user has a choice between verbose or just seeing that the file has been created and dosent't want to see all the information.

Follows up https://github.com/gruntjs/grunt-contrib-concat/pull/145/files

And fixes gruntjs#153
  • Loading branch information
paladox committed Mar 25, 2016
1 parent 2a18b92 commit ff6cd04
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tasks/concat.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = function(grunt) {
separator: grunt.util.linefeed,
banner: '',
footer: '',
log: true,
stripBanners: false,
process: false,
sourceMap: false,
Expand Down Expand Up @@ -114,7 +115,12 @@ module.exports = function(grunt) {
grunt.file.write(f.dest, src);

// Print a success message.
grunt.verbose.write('File ' + chalk.cyan(f.dest) + ' created.');
if (options.log === true) {
grunt.log.writeln('File ' + chalk.cyan(f.dest) + ' created.');
} else {
grunt.verbose.write('File ' + chalk.cyan(f.dest) + ' created.');
}
}
});
});

Expand Down

0 comments on commit ff6cd04

Please sign in to comment.