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

Commit

Permalink
feat: Add nuxt windicss. (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangJoo-Park authored Mar 18, 2021
1 parent 1fc25de commit a0da946
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ yarn create nuxt-app <my-project>
- [Oruga](https://oruga.io/)
- [Tachyons](https://github.com/tachyons-css/tachyons)
- [Tailwind CSS](https://github.com/tailwindcss/tailwindcss)
- [Windi CSS](https://github.com/windicss/windicss)
- [Vant](https://github.com/youzan/vant)
- [View UI](https://www.iviewui.com/)
- [Vuesax](https://github.com/lusaxweb/vuesax)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"devDependencies": {
"nuxt-windicss": "^0.4.1"
}
}
3 changes: 3 additions & 0 deletions packages/cna-template/template/nuxt/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
// https://go.nuxtjs.dev/stylelint
'@nuxtjs/stylelint-module',
<%_ } _%>
<%_ if (ui === 'windicss') { _%>
'nuxt-windicss',
<%_ } _%>
<%_ if (ui === 'tailwind') { _%>
// https://go.nuxtjs.dev/tailwindcss
'@nuxtjs/tailwindcss',
Expand Down
1 change: 1 addition & 0 deletions packages/create-nuxt-app/lib/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module.exports = [
{ name: 'Oruga', value: 'oruga' },
{ name: 'Tachyons', value: 'tachyons' },
{ name: 'Tailwind CSS', value: 'tailwind' },
{ name: 'Windi CSS', value: 'windicss' },
{ name: 'Vant', value: 'vant' },
{ name: 'View UI', value: 'view-ui' },
{ name: 'Vuesax', value: 'vuesax' },
Expand Down
88 changes: 88 additions & 0 deletions packages/create-nuxt-app/test/snapshots/index.test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,94 @@ Generated by [AVA](https://avajs.dev).
}␊
`

## verify ui: Windi CSS

> Generated files
[
'.editorconfig',
'.gitignore',
'README.md',
'assets/README.md',
'components/Logo.vue',
'components/README.md',
'layouts/README.md',
'layouts/default.vue',
'middleware/README.md',
'nuxt.config.js',
'package.json',
'pages/README.md',
'pages/index.vue',
'plugins/README.md',
'static/README.md',
'static/favicon.ico',
'store/README.md',
]

> package.json
{
dependencies: {
'core-js': '^3.9.1',
nuxt: '^2.15.3',
},
devDependencies: {
'nuxt-windicss': '^0.4.1',
},
private: true,
scripts: {
build: 'nuxt build',
dev: 'nuxt',
generate: 'nuxt generate',
start: 'nuxt start',
},
}

> Generated nuxt.config.js
`export default {␊
// Global page headers: https://go.nuxtjs.dev/config-head␊
head: {␊
title: 'output',␊
htmlAttrs: {␊
lang: 'en'␊
},␊
meta: [␊
{ charset: 'utf-8' },␊
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },␊
{ hid: 'description', name: 'description', content: '' }␊
],␊
link: [␊
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }␊
]␊
},␊
// Global CSS: https://go.nuxtjs.dev/config-css␊
css: [␊
],␊
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins␊
plugins: [␊
],␊
// Auto import components: https://go.nuxtjs.dev/config-components␊
components: true,␊
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules␊
buildModules: [␊
'nuxt-windicss',␊
],␊
// Modules: https://go.nuxtjs.dev/config-modules␊
modules: [␊
],␊
// Build Configuration: https://go.nuxtjs.dev/config-build␊
build: {␊
}␊
}␊
`

## verify ui: Vant

> Generated files
Expand Down
Binary file modified packages/create-nuxt-app/test/snapshots/index.test.js.snap
Binary file not shown.

0 comments on commit a0da946

Please sign in to comment.