An open API service indexing awesome lists of open source software.

https://github.com/codepaintstudio/vuedir

VueDir is a lightweight library of custom directives for Vue.js.
https://github.com/codepaintstudio/vuedir

composition-api directives plugin typescript vue vue3

Last synced: 6 months ago
JSON representation

VueDir is a lightweight library of custom directives for Vue.js.

Awesome Lists containing this project

README

          

# 📡 VueDir


VueDir logo


Version
Downloads
License

English | [įŽ€äŊ“中文](./README.zh.md)

VueDir is a lightweight collection of Vue 3 directives designed to provide a set of practical custom directives that help developers build Vue applications more efficiently.

## ✨ Features

- đŸŽ¯ **Focus Directive**: Provides v-focus directive for automatic focus functionality
- 🎨 **Lightweight**: Import on demand, no extra bundle size
- 🔧 **Easy to Use**: Simple API design for quick adoption
- đŸ“Ļ **TypeScript**: Written in TypeScript with complete type support

## đŸ“Ļ Installation

Install with pnpm (recommended):

```bash
pnpm add @cp-vuedir/core
```

> Note: Make sure you have [pnpm installed](https://pnpm.io/installation) before running this command.

## 🚀 Usage

Register VueDir in your Vue application:

```ts
import { createApp } from 'vue'
import VueDir from '@cp-vuedir/core'

const app = createApp(App)
app.use(VueDir)
app.mount('#app')
```

Or import individual directives:

```ts
import { createApp } from 'vue'
import { vFocus, vDrag } from '@cp-vuedir/core'

const app = createApp(App)
app.directive('focus', vFocus)
app.directive('drag', vDrag)
app.mount('#app')
```

## 📖 Documentation

Visit our [official documentation](https://vuedir.feashow.cn/) for more information.

## 🤝 Contributing

We welcome all forms of contributions! Please check our [Contributing Guide](./CONTRIBUTING.md) to learn how to get involved.

### Development Setup

```bash
# Make sure you have pnpm installed (https://pnpm.io/installation)
npm install -g pnpm

# Clone the repo
git clone https://github.com/CodePaintStudio/vuedir
cd vuedir

# Install dependencies
pnpm install

# Start development environment
pnpm dev
```

### Code Formatting

This project uses Prettier for code formatting. You can format your code by running:

```bash
# Format all files
pnpm format

# Check if files are correctly formatted
pnpm format:check
```

The Prettier configuration is defined in `.prettierrc` at the project root.

## 📄 License

VueDir is open-source software licensed under the MIT License. See the [MIT License](https://github.com/CodePaintStudio/codepaint/blob/main/LICENSE) file for more details.