Skip to content

Commit

Permalink
update gulp file
Browse files Browse the repository at this point in the history
  • Loading branch information
p4535992 committed Aug 31, 2022
1 parent b0377cb commit 9b3791a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,9 @@ const copyFiles = async() => {
const newFile = path.join('dist', path.relative(process.cwd(), file.replace(/src[\/\\]/g, '')));
console.log('Copying file: ' + newFile);
const folder = path.parse(newFile).dir;
if (!fs.existsSync(folder))
if (!fs.existsSync(folder)) {
fs.mkdirSync(folder, { recursive: true });
}
fs.copyFileSync(file, newFile);
}
})
Expand Down Expand Up @@ -507,7 +508,10 @@ async function packageBuild() {
}

// Ensure there is a directory to hold all the packaged versions
fs.existsSync('package');
// fs.existsSync('package');
if (!fs.existsSync('package')) {
fs.mkdirSync('package', { recursive: true });
}

// Initialize the zip file
const zipName = 'module.zip'; // `${manifest.file.name}-v${manifest.file.version}.zip`; // MOD 4535992
Expand Down Expand Up @@ -539,6 +543,7 @@ async function packageBuild() {
console.log(`Zip files`);

zip.finalize();
return resolve('done');
} catch (err) {
return reject(err);
}
Expand Down

0 comments on commit 9b3791a

Please sign in to comment.