deletefromcode task implemented

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 9 years ago
parent 6e0aac6355
commit 5fa6724215
  1. 22
      BuildServer/lib/tasks/deletefromcode.js

@ -0,0 +1,22 @@
"use strict";
var fse = require('fs-extra');
module.exports = function (params, processor) {
return {
process: function () {
var sourceFilePath = processor.context.exported + "/" + params.filename;
processor.onInfo("Deleting " + sourceFilePath);
fse.remove(sourceFilePath, function(err) {
if (err) {
processor.onError("Unable to delete file: " + err);
} else {
processor.onInfo("Deleted file");
}
return processor.done();
});
}
};
};
Loading…
Cancel
Save