Skip to content

Commit

Permalink
chore(dependencies): update to formkit-primevue-nuxt module
Browse files Browse the repository at this point in the history
  • Loading branch information
sfxcode committed Nov 3, 2024
1 parent cfd63fb commit f700455
Show file tree
Hide file tree
Showing 5 changed files with 401 additions and 584 deletions.
36 changes: 26 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Nuxt 3 + PrimeVue 4 Starter

Build your VUE.js App with Nuxt3 (Nuxt 4 ready). First Class PrimeVUE support. Validation by Formkit.
Module by [FormKitPrimeVueNuxt](https://github.com/sfxcode/nuxt3-primevue-starter).
Based on PrimeVue Styled Theme with Aura Preset.

[![CI](https://github.com/sfxcode/nuxt3-primevue-starter/actions/workflows/main.yml/badge.svg)](https://github.com/sfxcode/nuxt3-primevue-starter/actions/workflows/main.yml)
Expand All @@ -12,37 +13,52 @@ THX to [antfu / Vitesse Nuxt3](https://github.com/antfu/vitesse-nuxt3) for start
## Features

- [Nuxt 3](https://v3.nuxtjs.org) - SSR, ESR, File-based routing, components auto importing, modules, etc.
- [PrimeVue](https://primevue.org/) 4.x with Aura Theme
- [PrimeVue](https://primevue.org/) 4.2.x with Aura Theme
- [Formkit-PrimeVue](https://formkit-primevue.netlify.app/) PrimeVue Formkit Integration
- [Vite](https://vitejs.dev/) - Instant HMR
- [UnoCSS](https://github.com/antfu/unocss) - The instant on-demand atomic CSS engine.
- Use icons from any icon sets in Pure CSS, powered by [UnoCSS](https://github.com/antfu/unocss)
- [State Management via Pinia](https://pinia.esm.dev)
- [TipTap](https://tiptap.dev) - Headless Editor
- [Vitest](https://vitest.dev/) - Blazing Fast Unit Test Framework ([Getting started](https://vitest.dev/guide))
- [nuxt-test-utils](https://github.com/nuxt/test-utils) - Support for e2e and unit testing ([Getting started](https://nuxt.com/docs/getting-started/testing))

## Nuxt Modules
## Nuxt Modules (included in formkit-prinevue-nuxt)

- [FormKitPrimeVueNuxt](https://github.com/sfxcode/nuxt3-primevue-starter) FormKit PrimeVue Nuxt Module
- [PrimeVue-Nuxt](https://primevue.org/nuxt/) PrimeVue Nuxt Module
- [FormKit](https://formkit.com/) - Validation
- [I18n](https://v8.i18n.nuxtjs.org) - Integration with [Vue I18n](https://vue-i18n.intlify.dev/)

## Nuxt Modules (additional)

- [Pinia](https://pinia.esm.dev/) - intuitive, type safe, light and flexible Store for Vue.
- [VueUse](https://github.com/vueuse/vueuse) - collection of useful composition APIs.
- [FormKit](https://formkit.com/) - Validation
- [UnoCSS](https://github.com/antfu/unocss) - the instant on-demand atomic CSS engine.
- [Content](https://content.nuxtjs.org) - parses .md, .yml, .csv and .json files
- [Images](https://nuxt.com/modules/images) - Optimised images for Nuxt
- [Fonts](https://nuxt.com/modules/fonts) - Plug-and-play custom web font optimization and configuration for Nuxt apps
- [I18n](https://v8.i18n.nuxtjs.org) - Integration with [Vue I18n](https://vue-i18n.intlify.dev/)
- [nuxt-test-utils](https://github.com/nuxt/test-utils) - Support for e2e and unit testing ([Getting started](https://nuxt.com/docs/getting-started/testing))

## Module Configurations

### FormKit PrimeVue Nuxt

## Nuxt PrimeVue configuration
```typescript
formkitPrimevue: {
includePrimeIcons: true,
includeStyles: true,
formkitAutoConfig: true,
formkitLocale: 'en',
formkitPluginAnimate: true,
formkitPluginAsterisk: true,
},
```

Important: use autoimport false if using primevue formkit validation
### Nuxt PrimeVue configuration

```typescript
primevue: {
autoImport: false,
components: {
exclude: ['Chart', 'Editor'],
autoImport: true,
},
options: {
theme: {
Expand Down
34 changes: 0 additions & 34 deletions formkit.config.ts

This file was deleted.

26 changes: 10 additions & 16 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,18 @@ export default defineNuxtConfig({
},

modules: [
'@primevue/nuxt-module',
'@unocss/nuxt',
'@pinia/nuxt',
'@nuxtjs/i18n',
'@nuxt/content',
'@vueuse/nuxt',
'@nuxt/test-utils/module',
'@nuxt/image',
'@nuxt/fonts',
'@formkit/nuxt',

'@sfxcode/formkit-primevue-nuxt',
],

formkit: {
autoImport: true,
},

content: {
highlight: {
theme: 'one-dark-pro',
Expand All @@ -56,12 +51,16 @@ export default defineNuxtConfig({
],
vueI18n: './vue-i18n.options.ts',
},

formkitPrimevue: {
includePrimeIcons: true,
includeStyles: true,
formkitAutoConfig: true,
formkitLocale: 'en',
formkitPluginAnimate: true,
formkitPluginAsterisk: true,
},
primevue: {
autoImport: false,
components: {
exclude: ['Chart', 'Editor', 'Form', 'FormField'],
},
autoImport: true,
options: {
theme: {
preset: Aura,
Expand All @@ -73,11 +72,6 @@ export default defineNuxtConfig({
},
},

css: [
'primeicons/primeicons.css',
'@sfxcode/formkit-primevue/dist/sass/formkit-primevue.scss',
],

build: {
transpile: ['nuxt', 'primevue', 'formkit-primevue'],
},
Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
"test:unit": "vitest --run --reporter verbose",
"test:coverage": "vitest run --coverage",
"postinstall": "nuxt prepare",
"release": "npm run lint && npm run build && changelogen --patch --release && git push --follow-tags"
"release": "npm run lint && npm run build && changelogen --minor --release && git push --follow-tags"
},
"devDependencies": {
"@antfu/eslint-config": "^3.8.0",
"@formkit/nuxt": "^1.6.7",
"@iconify-json/carbon": "^1.2.4",
"@iconify-json/mdi": "^1.2.1",
"@iconify-json/prime": "^1.2.1",
Expand All @@ -32,11 +31,9 @@
"@nuxt/fonts": "^0.10.2",
"@nuxt/image": "^1.8.1",
"@nuxt/test-utils": "^3.14.4",
"@nuxtjs/i18n": "8.5.5",
"@pinia/nuxt": "^0.6.1",
"@primevue/nuxt-module": "^4.2.1",
"@primevue/themes": "^4.2.1",
"@sfxcode/formkit-primevue": "^2.6.2",
"@sfxcode/formkit-primevue-nuxt": "^1.1.2",
"@tiptap/extension-highlight": "^2.9.1",
"@tiptap/extension-text-align": "^2.9.1",
"@tiptap/extension-text-style": "^2.9.1",
Expand All @@ -52,14 +49,11 @@
"eslint": "^9.14.0",
"happy-dom": "^15.8.0",
"jsdom": "^25.0.1",
"nitropack": "2.9.7",
"nuxt": "^3.13.2",
"primevue": "^4.2.1",
"sass": "1.78.0",
"typescript": "^5.6.3",
"unstorage": "^1.13.1",
"vitest": "^2.1.4",
"vue-i18n": "9.14.0",
"vue-sidebar-menu": "^5.4.2"
},
"packageManager": "pnpm@9.12.0+sha256.a61b67ff6cc97af864564f4442556c22a04f2e5a7714fbee76a1011361d9b726"
Expand Down
Loading

0 comments on commit f700455

Please sign in to comment.