Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from rashagu/next
Browse files Browse the repository at this point in the history
Next vue3.4 vite5
  • Loading branch information
rashagu authored Jul 12, 2024
2 parents f6ffcaa + d151a33 commit ab6b4c6
Show file tree
Hide file tree
Showing 124 changed files with 4,180 additions and 2,424 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
}
}
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Run install pnpm
Expand All @@ -30,7 +30,7 @@ jobs:
run: pnpm build:all

- name: Run test
run: pnpm test
run: pnpm test:unit
- name: Run codecov
run: npx codecov --token=${{ secrets.CODECOV_TOKEN }}

Expand Down
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,23 @@ pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
/packages/accessibility/tsconfig.node.tsbuildinfo
/coverage/

*.tsbuildinfo
4 changes: 2 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
registry=https://registry.npmmirror.com/
# registry=https://registry.npmmirror.com/

# registry=https://registry.npmjs.org/
registry=https://registry.npmjs.org/
auto-install-peers=true

5 changes: 5 additions & 0 deletions .npmrc.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
registry=https://registry.npmmirror.com/

# registry=https://registry.npmjs.org/
auto-install-peers=true

8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

55 changes: 27 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,45 @@
# This is a Vue adaptation based on [@dnd-kit](https://github.com/clauderic/dnd-kit)
# dnd-kit-vue

### TODO
- [ ] Performance optimization
- [ ] auto scroll
- [ ] ...
This template should help get you started developing with Vue 3 in Vite.

---
<p align="center">
<a href="https://dndkit.com">
<img alt="@dnd-kit – the modern drag & drop toolkit for React" src=".github/assets/dnd-kit-hero-banner.svg">
</a>
</p>
## Recommended IDE Setup

<p align="left">
<a href="https://www.npmjs.com/package/@dnd-kit-vue/core"><img src="https://img.shields.io/npm/v/@dnd-kit-vue/core.svg" alt="Stable Release" /></a>
</p>
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).

## Type Support for `.vue` Imports in TS

## Working in the `@dnd-kit-vue` repository
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.

### Packages contained within this repository
## Customize configuration

- `@dnd-kit-vue/core`
- `@dnd-kit-vue/accessibility`
- `@dnd-kit-vue/sortable`
- `@dnd-kit-vue/modifiers`
- `@dnd-kit-vue/utilities`
See [Vite Configuration Reference](https://vitejs.dev/config/).

### Installing dependencies
## Project Setup

You'll need to install all the dependencies in the root directory.
```sh
pnpm install
```

### Compile and Hot-Reload for Development

```sh
pnpm install && pnpm build:all
pnpm dev
```

This will install all dependencies in each project, build them
### Type-Check, Compile and Minify for Production

### Development workflow
```sh
pnpm build
```

In one terminal, run `pnpm dev` in parallel:
### Run Unit Tests with [Vitest](https://vitest.dev/)

```sh
pnpm dev
pnpm test:unit
```

### Lint with [ESLint](https://eslint.org/)

```sh
pnpm lint
```
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue + TS</title>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
Expand Down
59 changes: 34 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,49 @@
{
"name": "dnd-kit-vue",
"private": true,
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build:all": "pnpm -C ./packages/accessibility build && pnpm -C ./packages/utilities build && pnpm -C ./packages/core build && pnpm -C ./packages/modifiers build && pnpm -C ./packages/sortable build",
"preview": "vite preview",
"test:unit": "vitest",
"build:all": "pnpm -C ./packages/accessibility build && pnpm -C ./packages/core build && pnpm -C ./packages/modifiers build && pnpm -C ./packages/sortable build && pnpm -C ./packages/utilities build",
"type-check": "vue-tsc --build --force",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"format": "prettier --write src/",
"change": "pnpm changeset",
"version": "pnpm changeset version",
"publish": "pnpm changeset publish",
"preEnter": "changeset pre enter vue",
"preExit": "changeset pre exit",
"test": "vitest run --coverage",
"test:watch": "vitest watch"
"publish": "pnpm changeset publish"
},
"dependencies": {
"@changesets/cli": "^2.25.2",
"@dnd-kit-vue/core": "0.0.3",
"@dnd-kit-vue/modifiers": "0.0.3",
"@dnd-kit-vue/sortable": "0.0.3",
"@dnd-kit-vue/utilities": "0.0.3",
"@dnd-kit-vue/accessibility": "0.0.3",
"vue": "^3.2.45"
"@changesets/cli": "^2.27.5",
"@dnd-kit-vue/accessibility": "workspace:*",
"@dnd-kit-vue/core": "workspace:*",
"@dnd-kit-vue/modifiers": "workspace:*",
"@dnd-kit-vue/sortable": "workspace:*",
"@dnd-kit-vue/utilities": "workspace:*",
"vue": "^3.4.27"
},
"devDependencies": {
"@types/node": "^18.11.9",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"rimraf": "^3.0.2",
"@vitest/coverage-c8": "^0.25.3",
"@vue/test-utils": "^2.2.4",
"jsdom": "^20.0.3",
"typescript": "^4.9.3",
"vite": "^4.0.3",
"vitest": "^0.25.3",
"vue-tsc": "^1.0.9"
"@rushstack/eslint-patch": "^1.8.0",
"@tsconfig/node20": "^20.1.4",
"@types/jsdom": "^21.1.6",
"@types/node": "^20.12.5",
"@vitejs/plugin-vue": "^5.0.5",
"@vitejs/plugin-vue-jsx": "^4.0.0",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/test-utils": "^2.4.5",
"@vue/tsconfig": "^0.5.1",
"eslint": "^8.57.0",
"eslint-plugin-vue": "^9.23.0",
"jsdom": "^24.0.0",
"npm-run-all2": "^6.1.2",
"prettier": "^3.2.5",
"typescript": "^5.5.1-rc",
"vite": "^5.2.13",
"vite-plugin-vue-devtools": "^7.0.25",
"vitest": "^1.4.0",
"vue-tsc": "^2.0.21"
}
}
18 changes: 18 additions & 0 deletions packages/accessibility/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @dnd-kit-vue/accessibility

## 0.1.2

### Patch Changes

- ff2942d: fix 0.1.1 ts5.5.1

## 0.1.1

### Patch Changes

- 23dd1f2: fix 0.1.0

## 0.1.0

### Minor Changes

- f221a5c: vue 3.4

## 0.0.5

### Patch Changes
Expand Down
25 changes: 12 additions & 13 deletions packages/accessibility/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dnd-kit-vue/accessibility",
"version": "0.0.5",
"version": "0.1.2",
"description": "A generic toolkit to help with accessibility",
"author": "Claudéric Demers",
"license": "MIT",
Expand All @@ -12,8 +12,8 @@
"scripts": {
"dev": "vite",
"rm:dist": "rimraf dist",
"tsc": "tsc -b --force tsconfig.build.json",
"build": "pnpm rm:dist && vue-tsc --noEmit && vite build && tsc -b --force tsconfig.build.json",
"tsc": "tsc -b --force",
"build": "pnpm rm:dist && vite build && tsc -b --force",
"preview": "vite preview"
},
"main": "dist/index.mjs",
Expand All @@ -24,20 +24,19 @@
"CHANGELOG.md",
"dist"
],
"dependencies": {
"vue": "^3.2.45"
},
"peerDependencies": {
"vue": "^3.2.45"
"vue": "^3.4.27",
"lodash": "^4.17.21"
},
"devDependencies": {
"@types/node": "^18.11.9",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@types/lodash": "^4.17.1",
"@types/node": "^20.12.11",
"@vitejs/plugin-vue": "^5.0.5",
"@vitejs/plugin-vue-jsx": "^4.0.0",
"rimraf": "^3.0.2",
"typescript": "^4.9.3",
"vite": "^4.0.3",
"vue-tsc": "^1.0.9"
"typescript": "^5.5.1-rc",
"vite": "^5.2.13",
"vue-tsc": "^2.0.21"
},
"publishConfig": {
"access": "public"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {CSSProperties, h} from "vue";
import {type CSSProperties, h} from "vue";

interface Props {
id: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {CSSProperties, h} from "vue";
import {type CSSProperties, h} from "vue";

export interface Props {
id: string;
Expand Down
19 changes: 0 additions & 19 deletions packages/accessibility/tsconfig.build.json

This file was deleted.

Loading

0 comments on commit ab6b4c6

Please sign in to comment.