Code Monkey home page Code Monkey logo

nuxt3-primevue-starter's Introduction

Nuxt 3 + PrimeVue 4 Starter

Build your VUE.js App with Nuxt3 (Nuxt 4 ready). First Class PrimeVUE support. Validation by Formkit. Based on PrimeVue Styled Theme with Aura Preset.

CI

THX to antfu / Vitesse Nuxt3 for starter code

Features

Nuxt Modules

  • PrimeVue-Nuxt PrimeVue Nuxt Module
  • Pinia - intuitive, type safe, light and flexible Store for Vue.
  • VueUse - collection of useful composition APIs.
  • FormKit - Validation
  • UnoCSS - the instant on-demand atomic CSS engine.
  • Content - parses .md, .yml, .csv and .json files
  • Images - Optimised images for Nuxt
  • Fonts - Plug-and-play custom web font optimization and configuration for Nuxt apps
  • I18n - Integration with Vue I18n

Nuxt PrimeVue configuration

Important: use autoimport false if using primevue formkit validation

  primevue: {
  autoImport: false,
    components: {
    exclude: ['Chart', 'Editor'],
  },
  options: {
    theme: {
      preset: Aura,
        options: {
        darkModeSelector: '.dark',
      },
    },
    ripple: true,
  },
},

PrimeVue 3

Nuxt PrimeVue 3 under the prime3 branch of this project

Starter App on Netlify

Project setup and usage

Install node:

Latest node LTS version required (20) Use node manager like nvm to install.

Install pnpm: https://pnpm.io/installation

Install dependencies:

pnpm install

Run development server:

pnpm dev

Vitest test runner:

pnpm test:unit

Build:

pnpm build

Start Production build:

pnpm start

Tools

I use IntelliJ with VUE.js plugin.

Supporters

JetBrains is supporting this open source project with:

Intellij IDEA

nuxt3-primevue-starter's People

Contributors

jianjroh avatar klukiyan avatar sfxcode avatar tomlamers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nuxt3-primevue-starter's Issues

histoire is not working

I just want to mentian that histoire is not working.
I get the error
RangeError: Maximum call stack size exceeded

how to reproduce it? clone it, pnpm install and pnpm run story:dev

Uncaught (in promise) Error: PrimeVue is not installed!

Hi,
I installed the latest 1.1.5
Got this message Uncaught (in promise) Error: PrimeVue is not installed!

tried to install with : pnpm add primevue
but still got this message.

Can someone help solve this issue please?

What are these WARNs all about

  • WARN Sourcemap for "virtual:nuxt:/home/manny/projects/mrv/nuxt3-primevue-starter/.nuxt/unocss.mjs" points to missing source files
  • WARN Sourcemap for "/__uno.css" points to missing source files

How to add prefix for primevue components

@sfxcode thank you for the starter, I wanted to know about FormKit configuration.
My primevue config is as below:

primevue: {
    options: {
      unstyled: false,
      ripple: true,
    },
    cssLayerOrder: "tailwind-base, primevue, tailwind-utilities",
    components: {
      prefix: "Prime",
      include: "*",
      exclude: [],
    },
    directives: {
      include: ["Ripple", "Tooltip"],
    },
  },

As you can see I have configured components prefix to be Prime. How do I do the same configuration in Formkit?

No Hot module reload (HMR)

Is it only me or is hmr not working?
Tested with a clean installation with newest Edge Browser Version 112.0.1722.39 (Offizielles Build) (64-Bit)
and Firefox 111.0.1 (64-bit).

Even if VS Code print this line in the terminal:
ℹ hmr update /pages/index.vue (x3)

yarn add primevue

excellent work. But why package.json does not come with primevue ? any reason ? here is my own package.json with latest nuxt by the way. Once again, excellent work

`
{
"name": "nuxt3-primevue-starter",
"version": "1.3.1",
"license": "MIT",
"scripts": {
"build": "nuxi build",
"dev": "nuxi dev",
"info": "nuxi info",
"generate": "nuxi generate",
"preview": "nuxi preview",
"module": "nuxi init -t module my-module",
"start": "node .output/server/index.mjs",
"lint": "eslint --fix .",
"test:ui": "vitest --ui",
"test:unit": "vitest --run --reporter verbose",
"test:coverage": "vitest run --coverage",
"story:dev": "histoire dev",
"story:build": "histoire build",
"story:preview": "histoire preview"
},
"devDependencies": {
"@antfu/eslint-config": "^0.36.0",
"@histoire/plugin-nuxt": "^0.15.8",
"@histoire/plugin-vue": "^0.15.8",
"@iconify-json/carbon": "^1.1.16",
"@iconify-json/mdi": "^1.1.49",
"@iconify-json/prime": "^1.1.5",
"@iconify-json/twemoji": "^1.1.11",
"@nuxt/content": "^2.5.2",
"@nuxt/test-utils": "^3.2.3",
"@pinia/nuxt": "^0.4.7",
"@sfxcode/nuxt-primevue": "^1.0.3",
"@unocss/nuxt": "^0.50.4",
"@vitejs/plugin-vue": "^4.0.0",
"@vitest/ui": "^0.29.2",
"@vueuse/nuxt": "^9.13.0",
"c8": "^7.13.0",
"eslint": "^8.35.0",
"histoire": "^0.15.8",
"jsdom": "^21.1.0",
"nuxt": "^3.3",
"sass": "^1.58.3",
"typescript": "^4.9.5",
"vitest": "^0.29.2"
},
"dependencies": {
"primevue": "^3.25.0"
}
}

`

unocss bg classes not rendering

Hi,
Thank you for an amazing template.
For some reason I can't make the bg class to work correctly.

For example if sombgcolor = bg-green-300

<Tag class="mr-2" value="Primary" :class="somebgcolor"></Tag>

First of all for some reason it renders the computed class twice and then doesn't color the element.
If I hardcode it - it sometimes works, sometimes doesn't. However with dynamic value it's always rendered twice in the dom and doesn't have any effect.

Cannot resolve vue-i18n on pnpm! please install it on 'node_modules'

### After run pnpm install i got the below error so i run pnpm add vue-i18 but i got the below code again when i run pnpm dev:

[9:00:06 PM] ERROR Cannot start nuxt: Cannot resolve vue-i18n on pnpm! please install it on 'node_modules'
9:00:05 PM
at tryResolve (node_modules/.pnpm/@nuxtjs[email protected][email protected]/node_modules/@nuxtjs/i18n/dist/module.mjs:136:9)
at async setupAlias (node_modules/.pnpm/@nuxtjs[email protected][email protected]/node_modules/@nuxtjs/i18n/dist/module.mjs:341:38)
at async setup (node_modules/.pnpm/@nuxtjs[email protected][email protected]/node_modules/@nuxtjs/i18n/dist/module.mjs:1573:5)
at async normalizedModule (node_modules/.pnpm/@nuxt[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2137:17)
at async installModule (node_modules/.pnpm/@nuxt[email protected]/node_modules/@nuxt/kit/dist/index.mjs:2407:95)
at async initNuxt (node_modules/.pnpm/nuxt@3.5.3_@types[email protected][email protected][email protected][email protected]/node_modules/nuxt/dist/index.mjs:2928:7)
at async load (node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/chunks/dev.mjs:204:9)
at async Object.invoke (node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/chunks/dev.mjs:248:5)
at async _main (node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/cli.mjs:48:20)

internationalization

Awesome template; would be more complete if you add an internationalization package. If you don’t have time, which one you recommended.

Copying auth pages from Sakai-vue

Hi i am trying to copy the vue files from Sakai-vue auth views (login.vue) but it doesn’t display right, i think because now using unocss not tailwind

Many typescript errors in VScode

Although these are not run time issues but when you open the project in VSCode many areas of the project are throwing the typescript "Property 'X' does not exist on type 'Y'."

For example
In /pages/prime/datatable.vue, this code:

filters.value = { global: { value: null, matchMode: FilterMatchMode.CONTAINS }, name: { value: null, matchMode: FilterMatchMode.CONTAINS }, code: { value: null, matchMode: FilterMatchMode.CONTAINS }, inventoryStatus: { value: null, matchMode: FilterMatchMode.STARTS_WITH }, }
is throwing
Property 'CONTAINS' does not exist on type 'FilterMatchModeOptions'.

also this line
<InputText v-model="filters.global.value" placeholder="Globale Suche" />

throws
Property 'global' does not exist on type '{}'.

[DEP0166] DeprecationWarning: Use of deprecated double slash resolving

Hi using node 20 lts, pnpm 9.6 tried windows and ubuntu wsl got same errors:

pn build:

[DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.json/index.mjs" for module request ".//index.json" matched to "./*" in the "exports" field module resolution of the package at C:\Users\x\OneDrive\Desktop\projects\nuxt3-primevue-stareter\node_modules\@primeuix\utils\package.json imported from C:\Users\x\OneDrive\Desktop\projects\nuxt3-primevue-stareter\node_modules\.pnpm\[email protected][email protected]\node_modules. (node:17788) [DEP0166] DeprecationWarning: Use of deprecated double slash resolving ".//index.mjs/index.mjs" for module request ".//index.mjs" matched to "./*" in the "exports" field module resolution of the package at

after all its working

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.