Socket
Book a DemoInstallSign in
Socket

@variate/nuxt

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@variate/nuxt

Variate plugin for Nuxt.js

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
2
Created
Source

npm (scoped with tag) NPM GitHub package.json dependency version (prod) Actions Status Actions Status

Variate Nuxt

Installation

  • Install the package:
$ npm install @variate/nuxt
  • Register the module in nuxt.config.js:
buildModules: [
    '@variate/nuxt'
]
  • Create the middleware/variate.js file, it will be used to initialize Variate, pass in the route object and any targeting values of your choice:
export default function ({ app: { $variate }, route }) {
  if($variate) {
    $variate.initialize({
      view: route,
      targeting: {
        ...
      }
    });
  }
};

Configuration

You can override any options from Variate in nuxt.config.js:

variate: {
    debug: true,
    tracking: true,
    pageview: true,
    reporter: () => {
        // your custom reporting function
    }   
}

By default, this module will attempt to load any configuration file named variate.json in the source directory of Nuxt directory.

If you would like to customize this path, specify the configPath in the variate config block in nuxt.config.js.

Keywords

variate

FAQs

Package last updated on 16 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.