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
590 B
24 lines
590 B
11 years ago
|
"use strict";
|
||
|
|
||
|
var fse = require('fs-extra');
|
||
|
|
||
|
module.exports = function (params, processor) {
|
||
|
return {
|
||
|
process: function () {
|
||
|
var sourceFilePath = processor.context.exported + "/" + params.filename,
|
||
|
targetFilePath = processor.context.release + "/" + params.filename;
|
||
|
|
||
|
processor.onInfo("Copying " + sourceFilePath + " to " + targetFilePath);
|
||
|
|
||
|
fse.copy(sourceFilePath, targetFilePath, function(err) {
|
||
|
if (err) {
|
||
|
processor.onError("Unable to copy file: " + err);
|
||
|
} else {
|
||
|
processor.onInfo("Copied file");
|
||
|
}
|
||
|
return processor.done();
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
};
|