diff --git a/package.json b/package.json index 4fa6ac8..5dcbbf0 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Nuxtr", "description": "An extension for Nuxt offering commands and tools to make your experience more pleasant.", "version": "0.2.14", - "packageManager": "pnpm@8.14.2", + "packageManager": "pnpm@8.14.3", "engines": { "vscode": "^1.85.0" }, diff --git a/src/utils/nuxt.ts b/src/utils/nuxt.ts index c1a9c0b..7054ac8 100644 --- a/src/utils/nuxt.ts +++ b/src/utils/nuxt.ts @@ -23,14 +23,7 @@ const isLayer = async (module: any) => { if (existsSync(modulePath)) { let nuxtConfigPath = `${modulePath}/nuxt.config.ts`; const result = pathExistsSync(nuxtConfigPath) - console.log('result', result); - - - if (result !== undefined) { - return true; - } else { - return false; - } + return result ? true : false; } }; @@ -174,7 +167,7 @@ const fetchNuxtAlias = async () => { } } catch (error) { - console.error('Error fetching Nuxt alias:', error); + throw new Error('Error fetching Nuxt alias: ' + error); } }; @@ -241,7 +234,7 @@ const scanNuxtDirectories = async () => { } } } catch (error) { - console.error('Error scanning Nuxt directories:', error); + throw new Error('Error scanning Nuxt directories: ' + error); } }