Skip to content

Commit

Permalink
fix: playground support vue2
Browse files Browse the repository at this point in the history
  • Loading branch information
KID-joker committed Oct 8, 2023
1 parent d52fe55 commit c32928c
Show file tree
Hide file tree
Showing 14 changed files with 119 additions and 117 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"build": "unbuild",
"dev": "unbuild --stub",
"lint": "eslint .",
"play:2.7": "nr -C playgrounds/vue2.7 dev",
"play:3": "nr -C playgrounds/vue3 dev",
"play:2.7": "vue-demi-switch 2.7 vue2 && nr -C playgrounds/vue2.7 dev",
"play:3": "vue-demi-switch 3 vue3 && nr -C playgrounds/vue3 dev",
"prepublishOnly": "nr build",
"release": "bumpp && npm publish",
"start": "esno src/index.ts",
Expand Down Expand Up @@ -69,8 +69,9 @@
"simple-git-hooks": "^2.9.0",
"typescript": "^5.2.2",
"unbuild": "^1.2.1",
"vue": "^3.3.4",
"vue-tsc": "^1.8.16"
"vue-tsc": "^1.8.16",
"vue2": "npm:vue@v2-latest",
"vue3": "npm:vue@latest"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
Expand Down
1 change: 0 additions & 1 deletion playgrounds/vue2.7/env.d.ts

This file was deleted.

21 changes: 4 additions & 17 deletions playgrounds/vue2.7/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,15 @@
"name": "vue2-ts",
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "run-p type-check build-only",
"dev": "vite --port 4173",
"preview": "vite preview --port 4173",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit"
"build": "vite build"
},
"dependencies": {
"vue": "^2.7.7",
"vue-masonry-grid": "file:../../dist"
"vue": "^2.7.7"
},
"devDependencies": {
"@types/node": "^16.11.45",
"@vitejs/plugin-legacy": "^2.0.0",
"@vitejs/plugin-vue2": "^1.1.2",
"@vue/tsconfig": "^0.1.3",
"npm-run-all": "^4.1.5",
"terser": "^5.14.2",
"typescript": "~4.7.4",
"vite": "^3.0.2",
"vue-tsc": "^0.38.8"
},
"resolutions": {
"vue-masonry-grid": "file:../../dist"
"vite": "^4.4.9"
}
}
8 changes: 0 additions & 8 deletions playgrounds/vue2.7/tsconfig.config.json

This file was deleted.

16 changes: 0 additions & 16 deletions playgrounds/vue2.7/tsconfig.json

This file was deleted.

11 changes: 6 additions & 5 deletions playgrounds/vue2.7/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { resolve } from 'node:path'
import { defineConfig } from 'vite'
import legacy from '@vitejs/plugin-legacy'
import vue2 from '@vitejs/plugin-vue2'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue2(),
legacy({
targets: ['ie >= 11'],
additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
}),
],
resolve: {
alias: {
'vue-masonry-grid': resolve(__dirname, '../../src'),
},
},
})
1 change: 0 additions & 1 deletion playgrounds/vue3/env.d.ts

This file was deleted.

18 changes: 3 additions & 15 deletions playgrounds/vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,14 @@
"private": true,
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false"
"build": "vite build"
},
"dependencies": {
"vue": "^3.3.4",
"vue-masonry-grid": "file:../../dist"
"vue": "^3.3.4"
},
"devDependencies": {
"@tsconfig/node18": "^18.2.2",
"@types/node": "^18.17.17",
"@vitejs/plugin-vue": "^4.3.4",
"@vue/tsconfig": "^0.4.0",
"npm-run-all2": "^6.0.6",
"typescript": "~5.2.0",
"vite": "^4.4.9",
"vue-tsc": "^1.8.11"
},
"resolutions": {
"vue-masonry-grid": "file:../../dist"
"vite": "^4.4.9"
}
}
12 changes: 0 additions & 12 deletions playgrounds/vue3/tsconfig.app.json

This file was deleted.

11 changes: 0 additions & 11 deletions playgrounds/vue3/tsconfig.json

This file was deleted.

16 changes: 0 additions & 16 deletions playgrounds/vue3/tsconfig.node.json

This file was deleted.

5 changes: 2 additions & 3 deletions playgrounds/vue3/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { URL, fileURLToPath } from 'node:url'

import { resolve } from 'node:path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

Expand All @@ -10,7 +9,7 @@ export default defineConfig({
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'vue-masonry-grid': resolve(__dirname, '../../src'),
},
},
})
105 changes: 98 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
packages:
- '!playgrounds'
- 'playgrounds/*'

0 comments on commit c32928c

Please sign in to comment.