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.
23 lines
566 B
23 lines
566 B
9 years ago
|
"use strict";
|
||
|
|
||
7 years ago
|
import path = require("path");
|
||
|
import fse = require("fs-extra");
|
||
9 years ago
|
|
||
7 years ago
|
export = (params, processor) => ({
|
||
7 years ago
|
"process": () => {
|
||
|
const sourceFilePath = path.join(processor.context.exported, params.filename);
|
||
9 years ago
|
|
||
7 years ago
|
processor.onInfo(`Deleting ${sourceFilePath}`);
|
||
9 years ago
|
|
||
7 years ago
|
fse.remove(sourceFilePath, (err) => {
|
||
|
if (err) {
|
||
|
processor.onError(`Unable to delete file: ${err}`);
|
||
|
} else {
|
||
|
processor.onInfo("Deleted file");
|
||
|
}
|
||
|
|
||
|
return processor.done();
|
||
|
});
|
||
|
}
|
||
|
});
|