Мелкий рефакторинг
This commit is contained in:
@@ -12,9 +12,9 @@ const outDir = `${distDir}/linux`;
|
|||||||
const tempDownloadDir = `${distDir}/tmp/download`;
|
const tempDownloadDir = `${distDir}/tmp/download`;
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
// перемещаем public на место
|
|
||||||
await fs.emptyDir(outDir);
|
await fs.emptyDir(outDir);
|
||||||
await fs.ensureDir(publicDir); // чтобы не ругался в postinstall
|
// перемещаем public на место
|
||||||
|
if (await fs.pathExists(publicDir))
|
||||||
await fs.move(publicDir, `${outDir}/public`);
|
await fs.move(publicDir, `${outDir}/public`);
|
||||||
|
|
||||||
await fs.ensureDir(tempDownloadDir);
|
await fs.ensureDir(tempDownloadDir);
|
||||||
|
|||||||
@@ -12,8 +12,9 @@ const outDir = `${distDir}/win`;
|
|||||||
const tempDownloadDir = `${distDir}/tmp/download`;
|
const tempDownloadDir = `${distDir}/tmp/download`;
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
// перемещаем public на место
|
|
||||||
await fs.emptyDir(outDir);
|
await fs.emptyDir(outDir);
|
||||||
|
// перемещаем public на место
|
||||||
|
if (await fs.pathExists(publicDir))
|
||||||
await fs.move(publicDir, `${outDir}/public`);
|
await fs.move(publicDir, `${outDir}/public`);
|
||||||
|
|
||||||
await fs.ensureDir(tempDownloadDir);
|
await fs.ensureDir(tempDownloadDir);
|
||||||
|
|||||||
Reference in New Issue
Block a user