Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit a0da946

Browse files
feat: Add nuxt windicss. (#753)
1 parent 1fc25de commit a0da946

File tree

6 files changed

+98
-0
lines changed

6 files changed

+98
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ yarn create nuxt-app <my-project>
4848
- [Oruga](https://oruga.io/)
4949
- [Tachyons](https://github.com/tachyons-css/tachyons)
5050
- [Tailwind CSS](https://github.com/tailwindcss/tailwindcss)
51+
- [Windi CSS](https://github.com/windicss/windicss)
5152
- [Vant](https://github.com/youzan/vant)
5253
- [View UI](https://www.iviewui.com/)
5354
- [Vuesax](https://github.com/lusaxweb/vuesax)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"devDependencies": {
3+
"nuxt-windicss": "^0.4.1"
4+
}
5+
}

packages/cna-template/template/nuxt/nuxt.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@
9595
// https://go.nuxtjs.dev/stylelint
9696
'@nuxtjs/stylelint-module',
9797
<%_ } _%>
98+
<%_ if (ui === 'windicss') { _%>
99+
'nuxt-windicss',
100+
<%_ } _%>
98101
<%_ if (ui === 'tailwind') { _%>
99102
// https://go.nuxtjs.dev/tailwindcss
100103
'@nuxtjs/tailwindcss',

packages/create-nuxt-app/lib/prompts.js

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module.exports = [
4141
{ name: 'Oruga', value: 'oruga' },
4242
{ name: 'Tachyons', value: 'tachyons' },
4343
{ name: 'Tailwind CSS', value: 'tailwind' },
44+
{ name: 'Windi CSS', value: 'windicss' },
4445
{ name: 'Vant', value: 'vant' },
4546
{ name: 'View UI', value: 'view-ui' },
4647
{ name: 'Vuesax', value: 'vuesax' },

packages/create-nuxt-app/test/snapshots/index.test.js.md

+88
Original file line numberDiff line numberDiff line change
@@ -1424,6 +1424,94 @@ Generated by [AVA](https://avajs.dev).
14241424
}␊
14251425
`
14261426

1427+
## verify ui: Windi CSS
1428+
1429+
> Generated files
1430+
1431+
[
1432+
'.editorconfig',
1433+
'.gitignore',
1434+
'README.md',
1435+
'assets/README.md',
1436+
'components/Logo.vue',
1437+
'components/README.md',
1438+
'layouts/README.md',
1439+
'layouts/default.vue',
1440+
'middleware/README.md',
1441+
'nuxt.config.js',
1442+
'package.json',
1443+
'pages/README.md',
1444+
'pages/index.vue',
1445+
'plugins/README.md',
1446+
'static/README.md',
1447+
'static/favicon.ico',
1448+
'store/README.md',
1449+
]
1450+
1451+
> package.json
1452+
1453+
{
1454+
dependencies: {
1455+
'core-js': '^3.9.1',
1456+
nuxt: '^2.15.3',
1457+
},
1458+
devDependencies: {
1459+
'nuxt-windicss': '^0.4.1',
1460+
},
1461+
private: true,
1462+
scripts: {
1463+
build: 'nuxt build',
1464+
dev: 'nuxt',
1465+
generate: 'nuxt generate',
1466+
start: 'nuxt start',
1467+
},
1468+
}
1469+
1470+
> Generated nuxt.config.js
1471+
1472+
`export default {␊
1473+
// Global page headers: https://go.nuxtjs.dev/config-head␊
1474+
head: {␊
1475+
title: 'output',␊
1476+
htmlAttrs: {␊
1477+
lang: 'en'␊
1478+
},␊
1479+
meta: [␊
1480+
{ charset: 'utf-8' },␊
1481+
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },␊
1482+
{ hid: 'description', name: 'description', content: '' }␊
1483+
],␊
1484+
link: [␊
1485+
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊
1486+
]␊
1487+
},␊
1488+
1489+
// Global CSS: https://go.nuxtjs.dev/config-css␊
1490+
css: [␊
1491+
],␊
1492+
1493+
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins␊
1494+
plugins: [␊
1495+
],␊
1496+
1497+
// Auto import components: https://go.nuxtjs.dev/config-components␊
1498+
components: true,␊
1499+
1500+
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules␊
1501+
buildModules: [␊
1502+
'nuxt-windicss',␊
1503+
],␊
1504+
1505+
// Modules: https://go.nuxtjs.dev/config-modules␊
1506+
modules: [␊
1507+
],␊
1508+
1509+
// Build Configuration: https://go.nuxtjs.dev/config-build␊
1510+
build: {␊
1511+
}␊
1512+
}␊
1513+
`
1514+
14271515
## verify ui: Vant
14281516

14291517
> Generated files
Binary file not shown.

0 commit comments

Comments
 (0)