azur
Version:
Azure Web App Deployment Automation
31 lines (26 loc) • 684 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = extract;
var _extractZip = _interopRequireDefault(require("extract-zip"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns a Promise which resolves on the extraction of a zip
* @param {string} fromPath
* @param {string} toPath
*/
function extract(fromPath, toPath) {
return new Promise((resolve, reject) => {
(0, _extractZip.default)(fromPath, {
dir: toPath
}, err => {
if (err) {
reject(err);
return;
}
resolve();
});
});
}
//# sourceMappingURL=extract.js.map