Skip to content

Commit f53c67c

Browse files
committed
docs: Update demo
1 parent fe11c31 commit f53c67c

19 files changed

+348
-297
lines changed

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Accessibility auditing for Vue.js applications by running [dequelabs/axe-core](https://github.com/dequelabs/axe-core/) validation on the page you're viewing, `axe-core` will run 1 second after the last VueJS update (with a 5 seconds debounce max wait). Package inspired by [dequelabs/react-axe](https://github.com/dequelabs/react-axe).
44

5+
## Links
6+
- [Demo](https://vue-axe.surge.sh/)
7+
58
## Install package
69
#### NPM
710
```shell
@@ -110,6 +113,7 @@ plugins: [
110113
#### CDN
111114
```html
112115
<script src="https://unpkg.com/vue"></script>
116+
<script src="https://unpkg.com/axe-core"></script>
113117
<script src="https://unpkg.com/vue-axe"></script>
114118
```
115119

Diff for: demo/.babelrc

-6
This file was deleted.

Diff for: demo/.browserslistrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not dead

Diff for: demo/.gitignore

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
.DS_Store
2-
node_modules/
3-
dist/
4-
npm-debug.log
5-
yarn-error.log
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
614

715
# Editor directories and files
816
.idea
17+
.vscode
918
*.suo
1019
*.ntvs*
1120
*.njsproj
1221
*.sln
22+
*.sw?

Diff for: demo/README.md

+12-20
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
1-
# testing-vue-axe
1+
# demo
22

3-
> Testing accessibility rules in Vue.js Applications with vue-axe
4-
5-
## Build Setup
6-
7-
``` bash
8-
# install vue-axe dependencies (root project / parent directory)
9-
npm install
10-
11-
# build vue-axe
12-
npm run dist
13-
14-
# switch to demo folder
15-
cd demo
16-
17-
# install demo dependencies
3+
## Project setup
4+
```
185
npm install
6+
```
197

20-
# serve with hot reload at localhost:8080
21-
npm run dev
8+
### Compiles and hot-reloads for development
9+
```
10+
npm run serve
11+
```
2212

23-
# build for production with minification
13+
### Compiles and minifies for production
14+
```
2415
npm run build
2516
```
2617

27-
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).
18+
### Customize configuration
19+
See [Configuration Reference](https://cli.vuejs.org/config/).

Diff for: demo/babel.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset'
4+
]
5+
}

Diff for: demo/index.html

-11
This file was deleted.

Diff for: demo/package.json

+11-27
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,20 @@
11
{
2-
"name": "testing-vue-axe",
3-
"description": "Testing accessibility rules in Vue.js Applications with vue-axe",
4-
"version": "1.0.0",
5-
"author": "Alan Albuquerque (ktquez) <[email protected]>",
6-
"license": "MIT",
2+
"name": "demo",
3+
"version": "0.1.0",
74
"private": true,
85
"scripts": {
9-
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
10-
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build"
118
},
129
"dependencies": {
13-
"vue": "^2.5.11",
14-
"vue-router": "^3.0.1"
10+
"core-js": "^3.6.5",
11+
"vue": "^2.6.11",
12+
"vue-router": "^3.2.0"
1513
},
16-
"browserslist": [
17-
"> 1%",
18-
"last 2 versions",
19-
"not ie <= 8"
20-
],
2114
"devDependencies": {
22-
"axe-core": "^3.5.3",
23-
"babel-core": "^6.26.0",
24-
"babel-loader": "^7.1.2",
25-
"babel-preset-env": "^1.6.0",
26-
"babel-preset-stage-3": "^6.24.1",
27-
"cross-env": "^5.0.5",
28-
"css-loader": "^0.28.7",
29-
"file-loader": "^1.1.4",
30-
"vue-axe": "^1.2.0",
31-
"vue-loader": "^13.0.5",
32-
"vue-template-compiler": "^2.4.4",
33-
"webpack": "^3.6.0",
34-
"webpack-dev-server": "^2.9.1"
15+
"@vue/cli-plugin-babel": "~4.4.0",
16+
"@vue/cli-plugin-router": "~4.4.0",
17+
"@vue/cli-service": "~4.4.0",
18+
"vue-template-compiler": "^2.6.11"
3519
}
3620
}

Diff for: demo/public/favicon.ico

4.19 KB
Binary file not shown.

Diff for: demo/public/index.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<div id="app"></div>
15+
<!-- built files will be auto injected -->
16+
</body>
17+
</html>

Diff for: demo/src/components/HelloWorld.vue

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<template>
2+
<div class="hello">
3+
<h1>{{ msg }}</h1>
4+
<p>
5+
For a guide and recipes on how to configure / customize this project,<br>
6+
check out the
7+
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
8+
</p>
9+
<h3>Installed CLI Plugins</h3>
10+
<ul>
11+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
12+
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
13+
</ul>
14+
<h3>Essential Links</h3>
15+
<ul>
16+
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
17+
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
18+
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
19+
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
20+
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
21+
</ul>
22+
<h3>Ecosystem</h3>
23+
<ul>
24+
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
25+
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
26+
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
27+
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
28+
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
29+
</ul>
30+
</div>
31+
</template>
32+
33+
<script>
34+
export default {
35+
name: 'HelloWorld',
36+
props: {
37+
msg: String
38+
}
39+
}
40+
</script>
41+
42+
<!-- Add "scoped" attribute to limit CSS to this component only -->
43+
<style scoped>
44+
h3 {
45+
margin: 40px 0 0;
46+
}
47+
ul {
48+
list-style-type: none;
49+
padding: 0;
50+
}
51+
li {
52+
display: inline-block;
53+
margin: 0 10px;
54+
}
55+
a {
56+
color: #42b983;
57+
}
58+
</style>

Diff for: demo/src/main.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import Vue from 'vue'
22
import VueAxe from '../vue-axe'
33
import App from './App.vue'
4-
import router from './router.js'
4+
import router from './router'
55

66
// Don't use this plugin in production => if (process.env.NODE_ENV !== 'production')
77
Vue.use(VueAxe)
88
Vue.config.productionTip = false
99

10-
/* eslint-disable no-new */
1110
new Vue({
12-
el: '#app',
1311
router,
1412
render: h => h(App)
15-
})
13+
}).$mount('#app')

Diff for: demo/src/pages/Home.vue

-126
This file was deleted.

0 commit comments

Comments
 (0)