You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
530 B
24 lines
530 B
11 years ago
|
"use strict";
|
||
|
|
||
|
var fs = require('fs');
|
||
|
var async = require('async');
|
||
|
var glob = require('glob');
|
||
|
|
||
|
module.exports = function (params, processor) {
|
||
|
return {
|
||
|
process: function () {
|
||
|
var filePath = processor.context.exported + "/" + params.filename;
|
||
|
processor.onInfo("Writing to " + filePath);
|
||
|
|
||
|
fs.writeFile(filePath, params.data, function(err) {
|
||
|
if (err) {
|
||
|
processor.onError("Unable to write file: " + err);
|
||
|
} else {
|
||
|
processor.onInfo("Written file");
|
||
|
}
|
||
|
return processor.done();
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
};
|