Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@vexip-ui/nuxt

vexip-ui90MIT1.3.1TypeScript support: included

Nuxt module for Vexip UI

nuxt, vexip-ui, components, vue, vexip, module, plugin, vite

readme

Vexip UI Nuxt

npm version

Nuxt Module for Vexip UI

Features

  • 🏆 Automatically import components, plugins, directives, icons and their styles on demand

Quick Setup

Add @vexip-ui/nuxt dependency to your project:

# Using pnpm
pnpm i -D @vexip-ui/nuxt

# Using yarn
yarn add -D @vexip-ui/nuxt

If you want to control the version of Vexip UI, you need to add vexip-ui dependency to your project too:

# Using pnpm
pnpm i -D vexip-ui

# Using yarn
yarn add -D vexip-ui

Add @vexip-ui/nuxt to the modules section of nuxt.config.ts:

export default defineNuxtConfig({
  modules: [
    '@vexip-ui/nuxt'
  ],
  vexipUI: {
    // Your module options
  }
})

That's it! You can now use Vexip UI in your Nuxt app:

<template>
  <VButton :icon="IUser" @click="handleClick">
    Button
  </VButton>
  <VIcon>
    <ISackDollar></ISackDollar>
  </VIcon>
</template>

<script setup lang="ts">
function handleClick() {
  VMessage.success('Success!')
}
</script>

Module Options

Note that each option has default value, you only need to specify when changing it.

import type { FilterPattern } from '@rollup/pluginutils'

export interface ModuleOptions {
  /**
   * Include files that need to automatically resolve
   *
   * @default
   * [
   *   /\.vue$/,
   *   /\.vue\?vue/,
   *   /\.vue\?v=/,
   *   /\.((c|m)?j|t)sx?$/
   * ]
   */
  include: FilterPattern,
  /**
   * Include files that don't need to automatically resolve
   *
   * @default
   * [
   *   /[\\/]node_modules[\\/]/,
   *   /[\\/]\.git[\\/]/,
   *   /[\\/]\.nuxt[\\/]/
   * ]
   */
  exclude: FilterPattern,
  /**
   * Import css or sass styles with components
   *
   * @default 'css'
   */
  importStyle: boolean | 'css' | 'sass',
  /**
   * Import the dark theme preset styles
   *
   * @default false
   */
  importDarkTheme: boolean,
  /**
   * Prefix for name of components
   *
   * @default 'V'
   */
  prefix: string,
  /**
   * Auto import for directives
   *
   * @default true
   */
  directives: boolean,
  /**
   * Resolve icon components from '@vexip-ui/icons'
   *
   * @default true
   */
  resolveIcon: boolean,
  /**
   * Prefix for name of icon components, same to `prefix` if undefined or null
   *
   * @default ''
   */
  iconPrefix: string
}

Contributors

Thanks for all their contributions!

Development

# Install dependencies
pnpm install

# Generate type stubs
pnpm run dev:prepare

# Develop with the playground
pnpm run dev

# Build the playground
pnpm run dev:build

# Run ESLint
pnpm run lint

# Run Vitest
pnpm run test
pnpm run test:watch

License

All in MIT license.

changelog

1.3.1 (2024-01-30)

1.3.0 (2024-01-30)

✨ Features

  • add themeVarsPath option (7fe63b6)

1.2.2 (2023-10-30)

🐞 Bug Fixes

  • build error when using improtDarkTheme (fb1aea8)

1.2.1 (2023-10-30)

🐞 Bug Fixes

  • ensure extend optimizeDeps work (d54c3cc)

1.2.0 (2023-10-30)

✨ Features

  • support import all style at once (eea8509)

🐞 Bug Fixes

  • add base lib dependencies to Vite optimizeDeps (6ddcb2d), closes #2

1.1.0 (2023-09-15)

1.0.0 (2023-05-15)

🐞 Bug Fixes

  • disable sourcemap in lower version (de0f83a)

1.0.0-dev.3 (2023-05-11)

1.0.0-dev.2 (2023-05-11)