Skip to content

Commit

Permalink
Merge branch 'main' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
TomokiMiyauci committed Jul 8, 2021
2 parents 1bd0359 + ac15702 commit defecae
Show file tree
Hide file tree
Showing 14 changed files with 1,004 additions and 9 deletions.
8 changes: 6 additions & 2 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<h1>utterances-component</h1>

<p>This page works native utterances script</p>

<a href="./react">react</a>
<a href="./vue">vue</a>

<script
src="https://utteranc.es/client.js"
Expand Down
File renamed without changes.
8 changes: 7 additions & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@
},
"devDependencies": {
"@preact/preset-vite": "^2.1.0",
"preact": "^10.5.14",
"@vitejs/plugin-vue": "^1.2.4",
"@vue/compiler-sfc": "^3.1.4",
"typescript": "^4.3.2",
"vite": "^2.4.0"
},
"dependencies": {
"preact": "^10.5.14",
"utterances-vue-component": "^1.0.0-beta.1",
"vue": "^3.1.4"
}
}
6 changes: 4 additions & 2 deletions website/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { defineConfig } from 'vite'
import { resolve } from 'path'
import preact from '@preact/preset-vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
plugins: [preact()],
plugins: [preact(), vue()],
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
react: resolve(__dirname, 'react/index.html')
react: resolve(__dirname, 'react/index.html'),
vue: resolve(__dirname, 'vue/index.html')
}
}
}
Expand Down
13 changes: 13 additions & 0 deletions website/vue/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<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>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="./src/main.ts"></script>
</body>
</html>
19 changes: 19 additions & 0 deletions website/vue/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"serve": "vite preview"
},
"dependencies": {
"vue": "^3.0.5"
},
"devDependencies": {
"@vitejs/plugin-vue": "^1.2.4",
"@vue/compiler-sfc": "^3.0.5",
"typescript": "^4.3.2",
"utterances-vue-component": "^1.0.0-beta.1",
"vite": "^2.4.0",
"vue-tsc": "^0.0.24"
}
}
Binary file added website/vue/public/favicon.ico
Binary file not shown.
11 changes: 11 additions & 0 deletions website/vue/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<template>
<Utterances
repo="TomokiMiyauci/utterances-component"
theme="github-light"
issue-term="pathname"
/>
</template>

<script setup lang="ts">
import { Utterances } from 'utterances-vue-component'
</script>
4 changes: 4 additions & 0 deletions website/vue/src/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { createApp } from 'vue'
import App from './App.vue'

createApp(App).mount('#app')
5 changes: 5 additions & 0 deletions website/vue/src/shims-vue.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module '*.vue' {
import { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
14 changes: 14 additions & 0 deletions website/vue/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"]
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}
12 changes: 12 additions & 0 deletions website/vue/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'

export default defineConfig({
resolve: {
alias: {
'@shared': resolve(__dirname, '..', '..')
}
},
plugins: [vue()]
})
Loading

0 comments on commit defecae

Please sign in to comment.