Skip to content

Commit 2e62ddc

Browse files
committed
Add install using Nuxt.js
1 parent f653aa5 commit 2e62ddc

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,30 @@ if (process.env.NODE_ENV !== 'production') {
3737
Optional: You can also pass settings through the second parameter at the time of installing the plugin, read about the object here:
3838
https://github.com/dequelabs/axe-core/blob/master/doc/API.md#api-name-axeconfigure
3939

40-
---
40+
## Install in Nuxt.js
41+
Create plugin file `plugins/axe.js`
42+
```javascript
43+
import Vue from 'vue'
44+
import VueAxe from 'vue-axe'
45+
46+
if (process.env.NODE_ENV !== 'production') {
47+
Vue.use(VueAxe, {
48+
config: {
49+
// your configuration data
50+
}
51+
})
52+
Vue.config.productionTip = false
53+
}
54+
55+
```
56+
57+
In config file `nuxt.config.js`
58+
```javascript
59+
...
60+
plugins: [
61+
{ src: '~/plugins/axe', ssr: false }
62+
]
63+
```
4164

4265
## Using with HTML files
4366
#### CDN
@@ -55,8 +78,6 @@ Vue.use(VueAxe, {
5578
})
5679
```
5780

58-
---
59-
6081
## Run the demo
6182
```shell
6283
git clone https://github.com/vue-a11y/vue-axe.git vue-axe-demo
@@ -68,7 +89,6 @@ npm run dev
6889
It is a simple webpack template already installed and configured to run and check the logs in the browser console.
6990
After the commands just access the http://localhost:8080/
7091

71-
---
7292

7393
## Run the tests
7494
```shell
@@ -82,8 +102,6 @@ Or run Cypress on interactive mode
82102
npm run test:open
83103
```
84104

85-
---
86-
87105
## Contributing
88106
- Check the open issues or open a new issue to start a discussion around your feature idea or the bug you found;
89107
- Fork repository, make changes and send a pull request;

0 commit comments

Comments
 (0)