mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-13 08:32:26 +03:00
feat: add vue-demi support
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { createApp, h } from 'vue'
|
import { createApp } from 'vue-demi'
|
||||||
import Dev from './Dev.vue'
|
import Dev from './Dev.vue'
|
||||||
|
|
||||||
createApp(Dev).mount('#app')
|
createApp(Dev).mount('#app')
|
||||||
|
|||||||
+110
-100
@@ -1,104 +1,114 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-select",
|
"name": "vue-select",
|
||||||
"version": "4.0.0-beta.6",
|
"version": "4.0.0-beta.6",
|
||||||
"description": "Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.",
|
"description": "Everything you wish the HTML <select> element could do, wrapped up into a lightweight, extensible Vue component.",
|
||||||
"author": "Jeff Sagal <sagalbot@gmail.com>",
|
"author": "Jeff Sagal <sagalbot@gmail.com>",
|
||||||
"homepage": "https://vue-select.org",
|
"homepage": "https://vue-select.org",
|
||||||
"directories": {
|
"directories": {
|
||||||
"doc": "docs",
|
"doc": "docs",
|
||||||
"test": "tests"
|
"test": "tests"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"main": "./dist/vue-select.umd.js",
|
||||||
|
"module": "./dist/vue-select.es.js",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"import": "./dist/vue-select.es.js",
|
||||||
|
"require": "./dist/vue-select.umd.js"
|
||||||
},
|
},
|
||||||
"files": [
|
"./dist/vue-select.css": {
|
||||||
"dist"
|
"import": "./dist/vue-select.css",
|
||||||
],
|
"require": "./dist/vue-select.css",
|
||||||
"main": "./dist/vue-select.umd.js",
|
"style": "./dist/vue-select.css"
|
||||||
"module": "./dist/vue-select.es.js",
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"import": "./dist/vue-select.es.js",
|
|
||||||
"require": "./dist/vue-select.umd.js"
|
|
||||||
},
|
|
||||||
"./dist/vue-select.css": {
|
|
||||||
"import": "./dist/vue-select.css",
|
|
||||||
"require": "./dist/vue-select.css",
|
|
||||||
"style": "./dist/vue-select.css"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"private": false,
|
|
||||||
"license": "MIT",
|
|
||||||
"prepare": "npm run build",
|
|
||||||
"scripts": {
|
|
||||||
"dev:docs": "cd docs && yarn serve",
|
|
||||||
"build:docs": "cd docs && yarn build",
|
|
||||||
"semantic-release": "semantic-release",
|
|
||||||
"commit": "git-cz",
|
|
||||||
"dev": "vite",
|
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
|
||||||
"preview": "vite preview --port 5050",
|
|
||||||
"test": "vitest --environment jsdom",
|
|
||||||
"coverage": "vitest --run --coverage --environment jsdom --silent",
|
|
||||||
"typecheck": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
|
|
||||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/sagalbot/vue-select.git"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"vue": "3.x"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@rushstack/eslint-patch": "^1.2.0",
|
|
||||||
"@semantic-release/git": "^10.0.1",
|
|
||||||
"@semantic-release/github": "^8.0.7",
|
|
||||||
"@types/jsdom": "^20.0.1",
|
|
||||||
"@types/node": "^18.11.10",
|
|
||||||
"@vitejs/plugin-vue": "^3.2.0",
|
|
||||||
"@vitest/coverage-c8": "^0.25.3",
|
|
||||||
"@vue/eslint-config-prettier": "^7.0.0",
|
|
||||||
"@vue/eslint-config-typescript": "^11.0.2",
|
|
||||||
"@vue/test-utils": "^2.2.4",
|
|
||||||
"@vue/tsconfig": "^0.1.3",
|
|
||||||
"autoprefixer": "^10.4.13",
|
|
||||||
"bundlewatch": "^0.3.3",
|
|
||||||
"commitizen": "^4.2.5",
|
|
||||||
"coveralls": "^3.1.1",
|
|
||||||
"cross-env": "^7.0.3",
|
|
||||||
"cz-conventional-changelog": "3.3.0",
|
|
||||||
"eslint": "^8.28.0",
|
|
||||||
"eslint-plugin-vue": "^9.8.0",
|
|
||||||
"jsdom": "^20.0.3",
|
|
||||||
"postcss-nested": "^6.0.0",
|
|
||||||
"prettier": "^2.8.0",
|
|
||||||
"semantic-release": "^19.0.5",
|
|
||||||
"typescript": "^4.9.3",
|
|
||||||
"vite": "^3.2.4",
|
|
||||||
"vitest": "^0.25.3",
|
|
||||||
"vue": "^3.2.45",
|
|
||||||
"vue-tsc": "^1.0.10"
|
|
||||||
},
|
|
||||||
"config": {
|
|
||||||
"commitizen": {
|
|
||||||
"path": "./node_modules/cz-conventional-changelog"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bundlewatch": {
|
|
||||||
"files": [
|
|
||||||
{
|
|
||||||
"path": "./dist/vue-select.es.js",
|
|
||||||
"compression": "gzip",
|
|
||||||
"maxSize": "8 KB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/vue-select.umd.js",
|
|
||||||
"compression": "gzip",
|
|
||||||
"maxSize": "7 KB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "./dist/vue-select.css",
|
|
||||||
"compression": "gzip",
|
|
||||||
"maxSize": "2 KB"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"private": false,
|
||||||
|
"license": "MIT",
|
||||||
|
"prepare": "npm run build",
|
||||||
|
"scripts": {
|
||||||
|
"dev:docs": "cd docs && yarn serve",
|
||||||
|
"build:docs": "cd docs && yarn build",
|
||||||
|
"semantic-release": "semantic-release",
|
||||||
|
"commit": "git-cz",
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vue-tsc --noEmit && vite build",
|
||||||
|
"preview": "vite preview --port 5050",
|
||||||
|
"test": "vitest --environment jsdom",
|
||||||
|
"coverage": "vitest --run --coverage --environment jsdom --silent",
|
||||||
|
"typecheck": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
|
||||||
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/sagalbot/vue-select.git"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@vue/composition-api": "^1.0.0-rc.1",
|
||||||
|
"vue": "^2.0.0 || >=3.0.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@vue/composition-api": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@rushstack/eslint-patch": "^1.2.0",
|
||||||
|
"@semantic-release/git": "^10.0.1",
|
||||||
|
"@semantic-release/github": "^8.0.7",
|
||||||
|
"@types/jsdom": "^20.0.1",
|
||||||
|
"@types/node": "^18.11.10",
|
||||||
|
"@vitejs/plugin-vue": "^3.2.0",
|
||||||
|
"@vitest/coverage-c8": "^0.25.3",
|
||||||
|
"@vue/eslint-config-prettier": "^7.0.0",
|
||||||
|
"@vue/eslint-config-typescript": "^11.0.2",
|
||||||
|
"@vue/test-utils": "^2.2.4",
|
||||||
|
"@vue/tsconfig": "^0.1.3",
|
||||||
|
"autoprefixer": "^10.4.13",
|
||||||
|
"bundlewatch": "^0.3.3",
|
||||||
|
"commitizen": "^4.2.5",
|
||||||
|
"coveralls": "^3.1.1",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
|
"cz-conventional-changelog": "3.3.0",
|
||||||
|
"eslint": "^8.28.0",
|
||||||
|
"eslint-plugin-vue": "^9.8.0",
|
||||||
|
"jsdom": "^20.0.3",
|
||||||
|
"postcss-nested": "^6.0.0",
|
||||||
|
"prettier": "^2.8.0",
|
||||||
|
"semantic-release": "^19.0.5",
|
||||||
|
"typescript": "^4.9.3",
|
||||||
|
"vite": "^3.2.4",
|
||||||
|
"vitest": "^0.25.3",
|
||||||
|
"vue": "^3.2.45",
|
||||||
|
"vue-tsc": "^1.0.10",
|
||||||
|
"yarn": "^1.22.22"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"commitizen": {
|
||||||
|
"path": "./node_modules/cz-conventional-changelog"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bundlewatch": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "./dist/vue-select.es.js",
|
||||||
|
"compression": "gzip",
|
||||||
|
"maxSize": "8 KB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./dist/vue-select.umd.js",
|
||||||
|
"compression": "gzip",
|
||||||
|
"maxSize": "7 KB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./dist/vue-select.css",
|
||||||
|
"compression": "gzip",
|
||||||
|
"maxSize": "2 KB"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"vue-demi": "^0.14.7"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { it, describe, expect } from 'vitest'
|
import { it, describe, expect } from 'vitest'
|
||||||
import { defineComponent } from 'vue'
|
import { defineComponent } from 'vue-demi'
|
||||||
import { selectWithProps } from '@tests/helpers.js'
|
import { selectWithProps } from '@tests/helpers.js'
|
||||||
|
|
||||||
describe('Components API', () => {
|
describe('Components API', () => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { it, test, describe, expect, vi } from 'vitest'
|
import { it, test, describe, expect, vi } from 'vitest'
|
||||||
import { h } from 'vue'
|
import { h } from 'vue-demi'
|
||||||
import { mountDefault } from '@tests/helpers.js'
|
import { mountDefault } from '@tests/helpers.js'
|
||||||
|
|
||||||
describe('Scoped Slots', () => {
|
describe('Scoped Slots', () => {
|
||||||
|
|||||||
+32
-29
@@ -6,37 +6,40 @@ import vue from '@vitejs/plugin-vue'
|
|||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
publicDir: false,
|
publicDir: false,
|
||||||
resolve: {
|
optimizeDeps: {
|
||||||
alias: {
|
exclude: ['vue-demi'],
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
},
|
||||||
'@tests': fileURLToPath(new URL('./tests', import.meta.url)),
|
resolve: {
|
||||||
},
|
alias: {
|
||||||
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
|
'@tests': fileURLToPath(new URL('./tests', import.meta.url)),
|
||||||
},
|
},
|
||||||
build: {
|
},
|
||||||
target: 'es2015',
|
build: {
|
||||||
lib: {
|
target: 'es2015',
|
||||||
entry: resolve(__dirname, 'src/index.js'),
|
lib: {
|
||||||
name: 'vue-select',
|
entry: resolve(__dirname, 'src/index.js'),
|
||||||
fileName: (format) => `vue-select.${format}.js`,
|
name: 'vue-select',
|
||||||
},
|
fileName: (format) => `vue-select.${format}.js`,
|
||||||
rollupOptions: {
|
|
||||||
external: ['vue'],
|
|
||||||
output: {
|
|
||||||
globals: { vue: 'Vue' },
|
|
||||||
assetFileNames(chunk): string {
|
|
||||||
if (chunk.name === 'style.css') {
|
|
||||||
return 'vue-select.css'
|
|
||||||
}
|
|
||||||
return chunk.name || ''
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
test: {
|
rollupOptions: {
|
||||||
coverage: {
|
external: ['vue'],
|
||||||
reporter: ['lcov'],
|
output: {
|
||||||
|
globals: { vue: 'Vue' },
|
||||||
|
assetFileNames(chunk): string {
|
||||||
|
if (chunk.name === 'style.css') {
|
||||||
|
return 'vue-select.css'
|
||||||
|
}
|
||||||
|
return chunk.name || ''
|
||||||
},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
test: {
|
||||||
|
coverage: {
|
||||||
|
reporter: ['lcov'],
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user