Skip to content

Commit

Permalink
feat: vue playground
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Aug 17, 2023
1 parent 591b65e commit 104e1ea
Show file tree
Hide file tree
Showing 14 changed files with 1,100 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ module.exports = {
node: true,
es6: true,
},
extends: ['@innei/eslint-config-react-ts'],
extends: ['@innei/eslint-config-ts'],
}
13 changes: 13 additions & 0 deletions example/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<DefaultLayout>

<Page />

</DefaultLayout>

</template>

<script setup>
import {DefaultLayout} from './layouts/Default.tsx'
import {Page} from './pages/page.tsx'
</script>
14 changes: 12 additions & 2 deletions example/index.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
html,
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-family:
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Open Sans',
'Helvetica Neue',
sans-serif;
}

.hello {
Expand Down
4 changes: 2 additions & 2 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand All @@ -7,7 +7,7 @@
<title>Vite</title>
</head>
<body>
<github-corner repo="Innei/rollup-typescript-lib"></github-corner>
<github-corner repo="----------------repo----------------"></github-corner>
<div id="app"></div>
<script src="./index.ts" type="module"></script>
<script src="./components/corner/index.ts" type="module"></script>
Expand Down
10 changes: 6 additions & 4 deletions example/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { date, test } from 'my-awesome-lib'

import './index.css'
import 'uno.css'
import '@unocss/reset/tailwind.css'

import { createApp } from 'vue'

import App from './App.vue'

test()
console.log(date)
createApp(App).mount('#app')
11 changes: 11 additions & 0 deletions example/layouts/Default.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineComponent } from 'vue'

export const DefaultLayout = defineComponent({
setup(ctx, { slots }) {
return () => (
<div>
<main class="max-w-60rem m-auto px-4 py-10">{slots.default?.()}</main>
</div>
)
},
})
8 changes: 7 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"dev": "vite"
},
"dependencies": {
"my-awesome-lib": "link:../"
"@unocss/reset": "0.55.1",
"my-awesome-lib": "link:../",
"vue": "3.3.4"
},
"devDependencies": {
"@vitejs/plugin-vue": "4.3.0",
"@vitejs/plugin-vue-jsx": "3.0.2"
}
}
7 changes: 7 additions & 0 deletions example/pages/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineComponent } from 'vue'

export const Page = defineComponent({
setup() {
return () => <div>Hello world</div>
},
})
Loading

0 comments on commit 104e1ea

Please sign in to comment.