Simplify default structure creation
authorRaphael von der Grün <raphinesse@gmail.com>
Fri, 11 May 2018 12:54:44 +0000 (14:54 +0200)
committerRaphael von der Grün <raphinesse@gmail.com>
Sat, 12 May 2018 16:00:33 +0000 (18:00 +0200)
index.js

index 688b362..f1e8078 100644 (file)
--- a/index.js
+++ b/index.js
@@ -265,9 +265,8 @@ module.exports = function (dir, optionalId, optionalName, cfg, extEvents) {
             }
 
             // Create basic project structure.
-            if (!fs.existsSync(path.join(dir, 'platforms'))) { shell.mkdir(path.join(dir, 'platforms')); }
-
-            if (!fs.existsSync(path.join(dir, 'plugins'))) { shell.mkdir(path.join(dir, 'plugins')); }
+            shell.mkdir('-p', path.join(dir, 'platforms'));
+            shell.mkdir('-p', path.join(dir, 'plugins'));
 
             var configPath = path.join(dir, 'config.xml');
             // only update config.xml if not a symlink