Skip to content

Commit

Permalink
refactor: move viteplay into vue-final-modal/viteplay
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterliu1003 committed Nov 8, 2022
1 parent 14d67a2 commit 3aaa817
Show file tree
Hide file tree
Showing 24 changed files with 78 additions and 110 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ dist
dist-ssr
node_modules
.idea/
*.log
coverage
.cache
*.log
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
"scripts": {
"dev": "concurrently \"pnpm:dev:*\"",
"dev:docs": "pnpm --filter docs dev",
"dev:viteplay": "pnpm --filter viteplay-example dev",
"build:vfm": "pnpm --filter vue-final-modal build",
"build:docs": "pnpm --filter docs build",
"generate:docs": "pnpm --filter docs generate",
"dev:viteplay": "pnpm --filter vue-final-modal dev:viteplay",
"build:viteplay": "pnpm --filter vue-final-modal build:viteplay",
"build:vfm": "pnpm --filter vue-final-modal build",
"test:vfm": "pnpm --filter vue-final-modal test",
"coverage:vfm": "pnpm --filter vue-final-modal coverage",
"release:vfm": "pnpm --filter vue-final-modal release",
"lint": "eslint . --ext=.ts,.vue --fix",
"typecheck": "pnpm --parallel typecheck",
"release:vfm": "pnpm --filter vue-final-modal release"
"typecheck": "pnpm --parallel typecheck"
},
"dependencies": {
"vue": "^3.2.41"
Expand Down
20 changes: 0 additions & 20 deletions packages/viteplay/package.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/viteplay/src/env.d.ts

This file was deleted.

22 changes: 0 additions & 22 deletions packages/viteplay/tsconfig.json

This file was deleted.

45 changes: 0 additions & 45 deletions packages/viteplay/vite.config.ts

This file was deleted.

12 changes: 0 additions & 12 deletions packages/viteplay/viteplay.iframe.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/vue-final-modal/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage
7 changes: 6 additions & 1 deletion packages/vue-final-modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"scripts": {
"dev": "vue-tsc --noEmit && vite build -w",
"build": "vue-tsc --noEmit && vite build && vue-tsc -p tsconfig.build-dts.json --declaration --emitDeclarationOnly",
"dev:viteplay": "vite --config vite.config.play.ts --host",
"build:viteplay": "vite build --config vite.config.play.ts",
"test": "vitest",
"coverage": "vitest run --coverage",
"typecheck": "vue-tsc --noEmit",
Expand All @@ -32,10 +34,13 @@
"@vueuse/core": "^9.4.0",
"@vueuse/integrations": "^9.4.0",
"focus-trap": "^7.0.0",
"vue": "^3.2.41"
"vue": "^3.2.41",
"vue-router": "^4.1.6"
},
"devDependencies": {
"@release-it/conventional-changelog": "^5.1.1",
"@viteplay/plugin": "^0.2.4",
"@viteplay/vue": "^0.2.4",
"@vitest/coverage-istanbul": "^0.24.5",
"jsdom": "^20.0.2",
"release-it": "^15.5.0",
Expand Down
49 changes: 49 additions & 0 deletions packages/vue-final-modal/vite.config.play.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import path from 'path'
import { defineConfig } from 'vite'
import vueMacros from 'unplugin-vue-macros/vite'
import vue from '@vitejs/plugin-vue'
import viteplay from '@viteplay/plugin'

export default defineConfig({
root: './viteplay',
resolve: {
alias: {
'~': `${path.resolve(__dirname, 'src')}`,
'vue-final-modal': `${path.resolve(__dirname, 'src/index')}`,
},
},
plugins: [
vueMacros({
plugins: {
vue: vue(),
},
}),
viteplay({
pages: [
{
title: 'VueFinalModal',
component: './src/components/VueFinalModal/VueFinalModal.vue',
examples: '../../../viteplay/src/components/VueFinalModal/*.example.vue',
},
{
title: 'VBottomSheet',
component: './src/components/VBottomSheet/VBottomSheet.vue',
examples: '../../../viteplay/src/components/VBottomSheet/*.example.vue',
},
{
title: 'VFullscreen',
component: './src/components/VFullscreen/VFullscreen.vue',
examples: '../../../viteplay/src/components/VFullscreen/*.example.vue',
},
],
// base route for the development pages
base: '/viteplay',
}),
],
build: {
outDir: 'playground',
},
define: {
__DEV__: JSON.stringify(!process.env.prod),
},
})
2 changes: 2 additions & 0 deletions packages/vue-final-modal/viteplay/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
playground
.cache
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vue 3 lib template</title>
<title>Vue Final Modal 4 | Viteplay</title>
</head>
<body>
<div id="app"></div>
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions packages/vue-final-modal/viteplay/viteplay.iframe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { createVfm } from '../src/index'

export default {
extend({ app }: any) {
app.use(createVfm())
},
}
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 3aaa817

Please sign in to comment.