Skip to content

Commit 0a2e808

Browse files
Merge pull request #7 from vue-a11y/nucleus-spa
Integrate `nucleus-vue` in the example SPA for `@vue-a11y/vlibras`
2 parents e06d220 + f5f7b2d commit 0a2e808

File tree

11 files changed

+57
-159
lines changed

11 files changed

+57
-159
lines changed

demo/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
5+
<link rel="icon" type="image/svg+xml" href="/vue.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + Vue</title>
7+
<title>vue-vlibras</title>
88
</head>
99
<body>
1010
<div id="app"></div>

demo/public/vite.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

demo/src/App.config.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import pkg from '../../package.json';
2+
const appVersion = pkg.version;
3+
const vueVersion = pkg.dependencies.vue.replace('^', '');
4+
5+
export const configApp = {
6+
name: '@vue-a11y/vlibras',
7+
npm: 'https://www.npmjs.com/package/@vue-a11y/vlibras',
8+
github: 'https://github.com/vue-a11y/vue-vlibras',
9+
author: 'Vue a11y',
10+
appVersion,
11+
vueVersion,
12+
stepsInstall: [
13+
{
14+
name: 'Install',
15+
language: 'bash',
16+
content: 'npm install vue-a11y/vlibras',
17+
},
18+
{
19+
name: 'Import in app',
20+
language: 'tsx',
21+
content: `import { createApp } from 'vue'
22+
import App from './App.vue'
23+
import VLibras from '@vue-a11y/vlibras'
24+
25+
createApp(App)
26+
.use(VLibras)
27+
.mount('#app')`,
28+
},
29+
{
30+
name: 'Usage component',
31+
language: 'tsx',
32+
content: `<VLibras />`,
33+
},
34+
],
35+
}

demo/src/App.vue

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,10 @@
11
<script setup>
2-
import HelloWorld from './components/HelloWorld.vue'
2+
import Nucleus from 'nucleus-vue';
3+
import { configApp } from './App.config';
34
</script>
45

56
<template>
6-
<div>
7-
<a href="https://vitejs.dev" target="_blank">
8-
<img src="/vite.svg" class="logo" alt="Vite logo" />
9-
</a>
10-
<a href="https://vuejs.org/" target="_blank">
11-
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
12-
</a>
13-
</div>
14-
<HelloWorld msg="Vite + Vue" />
15-
<VLibras />
7+
<Nucleus :config="configApp">
8+
<VLibras />
9+
</Nucleus>
1610
</template>
17-
18-
<style scoped>
19-
.logo {
20-
height: 6em;
21-
padding: 1.5em;
22-
will-change: filter;
23-
transition: filter 300ms;
24-
}
25-
.logo:hover {
26-
filter: drop-shadow(0 0 2em #646cffaa);
27-
}
28-
.logo.vue:hover {
29-
filter: drop-shadow(0 0 2em #42b883aa);
30-
}
31-
</style>

demo/src/components/HelloWorld.vue

Lines changed: 0 additions & 40 deletions
This file was deleted.

demo/src/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { createApp } from 'vue'
2-
import './style.css'
32
import App from './App.vue'
43
import VLibras from '../../src'
54

demo/src/style.css

Lines changed: 0 additions & 89 deletions
This file was deleted.

package-lock.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"project:publish": "git push --tags origin next && yarn build && npm publish --access public --tag next"
2424
},
2525
"dependencies": {
26+
"nucleus-vue": "^0.0.6",
2627
"standard-version": "^9.5.0",
2728
"vue": "^3.5.12"
2829
},

0 commit comments

Comments
 (0)