grunt-ebookr
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "grunt-ebookr", | ||
"description": "A Grunt plugin for ebookr", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"homepage": "https://github.com/ebookr/grunt-ebookr", | ||
@@ -6,0 +6,0 @@ "author": "Arne Hassel <arne.hassel@gmail.com> (http://icanhasweb.net)", |
@@ -30,2 +30,3 @@ /* | ||
// Iterate over all specified file groups. | ||
var taskOptions = this.data.options || {}; | ||
var promises = this.files.map(function(f) { | ||
@@ -47,4 +48,9 @@ var src = f.src.filter(function(filepath) { | ||
var promise = ebookr.pandoc.convert(tmpFilePath, { output: f.dest }); | ||
promise.then(function () { | ||
promise.then(function (error, stdout, stderr) { | ||
if (taskOptions.verbose) { | ||
if (stdout) grunt.log.println(stdout); | ||
if (stderr) grunt.log.errorln(stderr); | ||
} | ||
grunt.file.delete(tmpFilePath); | ||
grunt.log.writeln(util.format('%s created', f.dest)) | ||
}); | ||
@@ -51,0 +57,0 @@ return promise; |
9300
123