Implemented writefile task

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 10 years ago
parent a9df031a36
commit e0940342ea
  1. 23
      BuildServer/lib/tasks/writefile.js

@ -0,0 +1,23 @@
"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();
});
}
};
};
Loading…
Cancel
Save