vaderjs 2.3.8 → 2.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.ts +1 -39
- package/main.js +2 -1
- package/package.json +1 -1
package/cli.ts
CHANGED
|
@@ -225,42 +225,4 @@ export async function listPlugins() {
|
|
|
225
225
|
logSection("🔌 Installed Vader plugins");
|
|
226
226
|
deps.forEach((d) => console.log("•", d));
|
|
227
227
|
}
|
|
228
|
-
|
|
229
|
-
/* ---------------------------------- cli ----------------------------------- */
|
|
230
|
-
|
|
231
|
-
const [, , command, arg] = process.argv;
|
|
232
|
-
|
|
233
|
-
switch (command) {
|
|
234
|
-
case "init":
|
|
235
|
-
await initProject(arg);
|
|
236
|
-
break;
|
|
237
|
-
|
|
238
|
-
case "add":
|
|
239
|
-
await addPlugin(arg);
|
|
240
|
-
break;
|
|
241
|
-
|
|
242
|
-
case "remove":
|
|
243
|
-
await removePlugin(arg);
|
|
244
|
-
break;
|
|
245
|
-
|
|
246
|
-
case "list":
|
|
247
|
-
await listPlugins();
|
|
248
|
-
break;
|
|
249
|
-
|
|
250
|
-
default:
|
|
251
|
-
console.log(`
|
|
252
|
-
Vader CLI
|
|
253
|
-
|
|
254
|
-
Commands:
|
|
255
|
-
vader init [dir] [--yes]
|
|
256
|
-
vader add <plugin> [--force]
|
|
257
|
-
vader remove <plugin>
|
|
258
|
-
vader list
|
|
259
|
-
|
|
260
|
-
Examples:
|
|
261
|
-
vader init my-app --yes
|
|
262
|
-
vader add bootstrap
|
|
263
|
-
vader remove bootstrap
|
|
264
|
-
vader list
|
|
265
|
-
`);
|
|
266
|
-
}
|
|
228
|
+
|
package/main.js
CHANGED
|
@@ -103,6 +103,7 @@ export function defineConfig(config) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
async function runPluginHook(hookName) {
|
|
106
|
+
console.log(config)
|
|
106
107
|
if (!config.plugins) return;
|
|
107
108
|
for (const plugin of config.plugins) {
|
|
108
109
|
if (typeof plugin[hookName] === "function") {
|
|
@@ -527,7 +528,7 @@ async function main() {
|
|
|
527
528
|
}
|
|
528
529
|
|
|
529
530
|
// Load config for runtime commands
|
|
530
|
-
|
|
531
|
+
config = await loadConfig();
|
|
531
532
|
config.port ||= 3000;
|
|
532
533
|
|
|
533
534
|
switch (command) {
|