Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
feat: use ackee property instead of nuxt-ackee
Browse files Browse the repository at this point in the history
  • Loading branch information
Atinux committed Mar 24, 2020
1 parent 5068184 commit c36460b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
30 changes: 13 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Codecov][codecov-src]][codecov-href]
[![License][license-src]][license-href]

> Nuxt.js module for Ackee analytics
> Nuxt.js module for [Ackee analytics](https://ackee.electerious.com)
[📖 **Release Notes**](./CHANGELOG.md)

Expand All @@ -15,27 +15,23 @@
1. Add `nuxt-ackee` dependency to your project

```bash
yarn add nuxt-ackee # or npm install nuxt-ackee
yarn add --dev nuxt-ackee # or npm install --save-dev nuxt-ackee
```

2. Add `nuxt-ackee` to the `modules` section of `nuxt.config.js`
2. Add `nuxt-ackee` to the `buildModules` section of `nuxt.config.js`

```js
{
modules: [
// Simple usage
'nuxt-ackee',
// With options
[
'nuxt-ackee',
{
server: 'https://example.com',
domainId: 'xxx-xxx-xxx',
ignoreLocalhost: false, // defaults to true
detailed: true // defaults to false
}
]
]
// use `modules` property is using Nuxt < 2.9.0
buildModules: [
'nuxt-ackee'
],
ackee: {
server: 'https://example.com',
domainId: 'xxx-xxx-xxx',
ignoreLocalhost: false, // defaults to true
detailed: true // defaults to false
}
}
```

Expand Down
2 changes: 1 addition & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { resolve } = require('path')

module.exports = function (moduleOptions) {
const options = {
...this.options['nuxt-ackee'],
...this.options.ackee,
...moduleOptions
}

Expand Down

0 comments on commit c36460b

Please sign in to comment.