From c2d294d7fae72a82d9412e5db6ca648fb2a09911 Mon Sep 17 00:00:00 2001 From: foxriver76 Date: Tue, 19 Dec 2023 15:48:25 +0100 Subject: [PATCH] create folder on initialization --- README.md | 3 +++ setup.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5c61ea7..d274793 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ Set process.env.JS_CONTROLLER_VERSION to version e.g. `5.0.5-alpha.0-20230617-46 ## Changelog +### **WORK IN PROGRESS** +* (foxriver76) create folder on initialization + ### 1.0.8 (2023-12-19) * (foxriver76) use hardcoded appName instead of inference with a heuristic approach diff --git a/setup.js b/setup.js index 3d99122..974784f 100644 --- a/setup.js +++ b/setup.js @@ -35,6 +35,8 @@ initialize(); function initialize() { pkg = require(`${rootDir}package.json`); pkg.main = pkg.main || 'main.js'; + + !fs.existsSync(`${rootDir}tmp`) && fs.mkdirSync(`${rootDir}tmp`); } /** Lowercase application name */ @@ -106,8 +108,6 @@ function copyFolderRecursiveSync(source, target, ignore) { } } -!fs.existsSync(`${rootDir}tmp`) && fs.mkdirSync(`${rootDir}tmp`); - async function storeOriginalFiles() { console.log('Store original files...'); const dataDir = `${rootDir}tmp/${appName}-data/`;