diff --git a/icongenie/lib/mount/mount-cordova.js b/icongenie/lib/mount/mount-cordova.js index b6e35daec28..8f886662aeb 100644 --- a/icongenie/lib/mount/mount-cordova.js +++ b/icongenie/lib/mount/mount-cordova.js @@ -130,22 +130,18 @@ function hasDeepProp (target /* , param1, param2, ... */) { function installSplashscreenPlugin () { const pkgPath = resolveDir('src-cordova/package.json') - if (!existsSync(pkgPath)) { - // malformed /src-cordova... - return - } + // malformed /src-cordova... + if (!existsSync(pkgPath)) return const pkg = JSON.parse( readFileSync(pkgPath, 'utf8') ) if ( + // it's already installed, so nothing to do hasDeepProp(pkg, 'dependencies', 'cordova-plugin-splashscreen') || hasDeepProp(pkg, 'cordova', 'plugins', 'cordova-plugin-splashscreen') - ) { - // it's already installed, so nothing to do - return - } + ) return log(`Installing cordova-plugin-splashscreen...`) diff --git a/icongenie/lib/mount/mount-tag.js b/icongenie/lib/mount/mount-tag.js index fa8ee362114..8c76cf85b1b 100644 --- a/icongenie/lib/mount/mount-tag.js +++ b/icongenie/lib/mount/mount-tag.js @@ -4,9 +4,7 @@ import { log } from '../utils/logger.js' export function mountTag (files) { const tagFiles = files.filter(file => file.tag) - if (tagFiles.length === 0) { - return - } + if (tagFiles.length === 0) return console.log() log(`You will need the following tags in your /index.html or /src/index.template.html:\n`) diff --git a/icongenie/lib/utils/parse-argv.js b/icongenie/lib/utils/parse-argv.js index ab6b1a8d337..7e2c1411f1e 100644 --- a/icongenie/lib/utils/parse-argv.js +++ b/icongenie/lib/utils/parse-argv.js @@ -20,9 +20,7 @@ function die (msg) { } function profile (value, argv) { - if (!value) { - return - } + if (!value) return const profilePath = resolve(process.cwd(), untildify(value)) @@ -61,9 +59,7 @@ function mode (value, argv) { } function include (value, argv) { - if (!value) { - return - } + if (!value) return if (value.includes('all')) { argv.include = modesList @@ -175,9 +171,7 @@ function icon (value, argv) { } function background (value, argv) { - if (!value) { - return - } + if (!value) return argv.background = resolve(appDir, untildify(value))