use utils extractZip instead of lib directly

This commit is contained in:
Iuri Matias 2018-07-06 17:54:52 +03:00
parent 1600150c2b
commit 2b783ffd03
1 changed files with 1 additions and 2 deletions

View File

@ -15,9 +15,8 @@ class TemplateGenerator {
fs.mkdirpSync(utils.dirname(tmpFilePath));
utils.downloadFile(url, tmpFilePath, () => {
let fspath = utils.joinPath(destinationFolder, name);
const decompress = require('decompress');
decompress(tmpFilePath, fspath, {
utils.extractZip(tmpFilePath, fspath, {
map: file => {
let fixed_path = file.path.split('/');
fixed_path.shift(); // remove first directory