Skip to content

Add support for Tailwind CSS v4. #765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const FEATURE_FLAGS = [
'default',
'ts',
'typescript',
'tailwindcss',
'jsx',
'router',
'vue-router',
Expand All @@ -49,6 +50,10 @@ const FEATURE_OPTIONS = [
value: 'typescript',
label: language.needsTypeScript.message,
},
{
value: 'tailwindcss',
label: language.needsTailwindCss.message,
},
{
value: 'jsx',
label: language.needsJsx.message,
Expand Down Expand Up @@ -170,6 +175,8 @@ Available feature flags:
Create a project with the default configuration without any additional features.
--ts, --typescript
Add TypeScript support.
--tailwindcss
Add Tailwind CSS support.
--jsx
Add JSX support.
--router, --vue-router
Expand Down Expand Up @@ -350,6 +357,7 @@ async function init() {
const { features, experimentFeatures } = result

const needsTypeScript = argv.ts || argv.typescript || features.includes('typescript')
const needsTailwindCss = argv.tailwindcss || features.includes('tailwindcss')
const needsJsx = argv.jsx || features.includes('jsx')
const needsRouter = argv.router || argv['vue-router'] || features.includes('router')
const needsPinia = argv.pinia || features.includes('pinia')
Expand Down Expand Up @@ -400,6 +408,9 @@ async function init() {
if (needsJsx) {
render('config/jsx')
}
if (needsTailwindCss) {
render('config/tailwindcss')
}
if (needsRouter) {
render('config/router')
}
Expand Down Expand Up @@ -519,6 +530,7 @@ async function init() {
// Render code template.
// prettier-ignore
const codeTemplate =
(needsTailwindCss ? 'tailwindcss-' : '') +
(needsTypeScript ? 'typescript-' : '') +
(needsRouter ? 'router' : 'default')
render(`code/${codeTemplate}`)
Expand Down
3 changes: 3 additions & 0 deletions locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"needsTypeScript": {
"message": "TypeScript"
},
"needsTailwindCss": {
"message": "Tailwind CSS"
},
"needsJsx": {
"message": "JSX Support"
},
Expand Down
3 changes: 3 additions & 0 deletions locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"needsTypeScript": {
"message": "TypeScript"
},
"needsTailwindCss": {
"message": "Tailwind CSS"
},
"needsJsx": {
"message": "Support de JSX"
},
Expand Down
3 changes: 3 additions & 0 deletions locales/tr-TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"needsTypeScript": {
"message": "TypeScript"
},
"needsTailwindCss": {
"message": "Tailwind CSS"
},
"needsJsx": {
"message": "JSX Desteği"
},
Expand Down
3 changes: 3 additions & 0 deletions locales/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"needsTypeScript": {
"message": "TypeScript"
},
"needsTailwindCss": {
"message": "Tailwind CSS"
},
"needsJsx": {
"message": "JSX 支持"
},
Expand Down
3 changes: 3 additions & 0 deletions locales/zh-Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
"needsTypeScript": {
"message": "TypeScript"
},
"needsTailwindCss": {
"message": "Tailwind CSS"
},
"needsJsx": {
"message": "JSX 支援"
},
Expand Down
Loading