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.
20 lines
507 B
20 lines
507 B
"use strict";
|
|
|
|
import { remove } from "fs-extra";
|
|
import { join } from "path";
|
|
|
|
export default ((params, processor) => () => {
|
|
const sourceFilePath = join(processor.context.exported, params.filename);
|
|
|
|
processor.onInfo(`Deleting ${sourceFilePath}`);
|
|
|
|
remove(sourceFilePath, (err) => {
|
|
if (err) {
|
|
processor.onError(`Unable to delete file: ${err}`);
|
|
} else {
|
|
processor.onInfo("Deleted file");
|
|
}
|
|
|
|
return processor.done();
|
|
});
|
|
}) as Task;
|
|
|