ui-thing 0.0.22 → 0.0.24

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.
@@ -1,42 +1,42 @@
1
- import { Command } from "commander";
2
- import prompts from "prompts";
3
-
4
- import { addShortcutFiles } from "../utils/addShortcutFiles";
5
- import { addModuleToConfig, getNuxtConfig, updateConfig } from "../utils/config";
6
- import { installPackages } from "../utils/installPackages";
7
- import { printFancyBoxMessage } from "../utils/printFancyBoxMessage";
8
-
9
- export const addShortcuts = new Command()
10
- .command("shortcuts")
11
- .name("shortcuts")
12
- .description("Add the defineShortcuts & useShortcuts composables to your project.")
13
- .action(async () => {
14
- await addShortcutFiles();
15
-
16
- // Get nuxt config
17
- const cfg = await getNuxtConfig();
18
- addModuleToConfig(cfg.nuxtConfig, ["@vueuse/nuxt"]);
19
- // Write changes to nuxt config
20
- await updateConfig(cfg.nuxtConfig, "nuxt.config.ts");
21
-
22
- const { pkgManager } = await prompts({
23
- name: "pkgManager",
24
- type: "select",
25
- message: "Which package manager are you using?",
26
- choices: [
27
- { title: "npm", value: "npm" },
28
- { title: "yarn", value: "yarn" },
29
- { title: "pnpm", value: "pnpm" },
30
- { title: "bun", value: "bun" },
31
- ],
32
- });
33
- if (!pkgManager) return process.exit(0);
34
-
35
- // install prettier dep
36
- await installPackages(pkgManager, undefined, ["@vueuse/math", "@vueuse/nuxt"]);
37
- printFancyBoxMessage(
38
- "All Done!",
39
- { title: "Shortcuts Added" },
40
- `Check the composables folder for the defineShortcuts & useShortcuts composables.`
41
- );
42
- });
1
+ import { Command } from "commander";
2
+ import prompts from "prompts";
3
+
4
+ import { addShortcutFiles } from "../utils/addShortcutFiles";
5
+ import { addModuleToConfig, getNuxtConfig, updateConfig } from "../utils/config";
6
+ import { installPackages } from "../utils/installPackages";
7
+ import { printFancyBoxMessage } from "../utils/printFancyBoxMessage";
8
+
9
+ export const addShortcuts = new Command()
10
+ .command("shortcuts")
11
+ .name("shortcuts")
12
+ .description("Add the defineShortcuts & useShortcuts composables to your project.")
13
+ .action(async () => {
14
+ await addShortcutFiles();
15
+
16
+ // Get nuxt config
17
+ const cfg = await getNuxtConfig();
18
+ addModuleToConfig(cfg.nuxtConfig, ["@vueuse/nuxt"]);
19
+ // Write changes to nuxt config
20
+ await updateConfig(cfg.nuxtConfig, "nuxt.config.ts");
21
+
22
+ const { pkgManager } = await prompts({
23
+ name: "pkgManager",
24
+ type: "select",
25
+ message: "Which package manager are you using?",
26
+ choices: [
27
+ { title: "npm", value: "npm" },
28
+ { title: "yarn", value: "yarn" },
29
+ { title: "pnpm", value: "pnpm" },
30
+ { title: "bun", value: "bun" },
31
+ ],
32
+ });
33
+ if (!pkgManager) return process.exit(0);
34
+
35
+ // install prettier dep
36
+ await installPackages(pkgManager, undefined, ["@vueuse/math", "@vueuse/nuxt"]);
37
+ printFancyBoxMessage(
38
+ "All Done!",
39
+ { title: "Shortcuts Added" },
40
+ `Check the composables folder for the defineShortcuts & useShortcuts composables.`
41
+ );
42
+ });