Skip to content

Commit 7e09b3c

Browse files
committed
fix: installed modules added to layers
1 parent ede4266 commit 7e09b3c

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Nuxtr",
44
"description": "An extension for Nuxt offering commands and tools to make your experience more pleasant.",
55
"version": "0.2.14",
6-
"packageManager": "[email protected].2",
6+
"packageManager": "[email protected].3",
77
"engines": {
88
"vscode": "^1.85.0"
99
},

src/utils/nuxt.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,7 @@ const isLayer = async (module: any) => {
2323
if (existsSync(modulePath)) {
2424
let nuxtConfigPath = `${modulePath}/nuxt.config.ts`;
2525
const result = pathExistsSync(nuxtConfigPath)
26-
console.log('result', result);
27-
28-
29-
if (result !== undefined) {
30-
return true;
31-
} else {
32-
return false;
33-
}
26+
return result ? true : false;
3427
}
3528
};
3629

@@ -174,7 +167,7 @@ const fetchNuxtAlias = async () => {
174167
}
175168

176169
} catch (error) {
177-
console.error('Error fetching Nuxt alias:', error);
170+
throw new Error('Error fetching Nuxt alias: ' + error);
178171
}
179172
};
180173

@@ -241,7 +234,7 @@ const scanNuxtDirectories = async () => {
241234
}
242235
}
243236
} catch (error) {
244-
console.error('Error scanning Nuxt directories:', error);
237+
throw new Error('Error scanning Nuxt directories: ' + error);
245238
}
246239

247240
}

0 commit comments

Comments
 (0)