Skip to content

Commit fab29df

Browse files
committed
chore: add TailwindCSS installation
1 parent e92c43c commit fab29df

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/commands/CSS.ts

+15-5
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,23 @@ const configureTailwind = () => {
5858
if (selections !== undefined && selections.length > 0) {
5959
if (selections.includes(TailwindOptions.installModule)) {
6060
const moduleName = '@nuxtjs/tailwindcss'
61-
const command = await getInstallationCommand(moduleName, true)
61+
const tailwindCommand = await getInstallationCommand('tailwindcss', true)
62+
const moduleCommand = await getInstallationCommand(moduleName, true)
63+
64+
if (!isNuxtTwo()) {
65+
await runCommand({
66+
command: tailwindCommand,
67+
message: 'Installing TailwindCSS',
68+
successMessage: 'TailwindCSS installed successfully',
69+
errorMessage: 'TailwindCSS installation failed',
70+
})
71+
}
6272

6373
await runCommand({
64-
command,
65-
message: 'Installing TailwindCSS',
66-
successMessage: 'TailwindCSS installed successfully',
67-
errorMessage: 'TailwindCSS installation failed',
74+
command: moduleCommand,
75+
message: 'Installing TailwindCSS Module',
76+
successMessage: 'TailwindCSS Module installed successfully',
77+
errorMessage: 'TailwindCSS Module installation failed',
6878
})
6979
await addNuxtModule({ npm: moduleName })
7080
}

0 commit comments

Comments
 (0)