@nuxtjs/plugin-utils

0.2.4 • Public • Published

plugin-utils

npm npm (scoped with tag)

A helper package for nuxt plugins

Available features:

Logging

If your nuxt plugin writes output (during build) you should import the log and/or error methods. Errors are printed in red and normal logs in purple. It is recommended to use your plugin's package name as the log identifier so users will know from which plugin the message originated.

These log methods are replaced with noop handlers for production builds.

Usage

module.exports.meta = require('./package.json')
const log = require('@nuxtjs/plugin-utils').log(module.exports.meta.name)
const error = require('@nuxtjs/plugin-utils').error(module.exports.meta.name)

log('information about what the plugin is doing during build') // printed in purple
error('oops, something went wrong') // printed in red

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i @nuxtjs/plugin-utils

    Weekly Downloads

    8

    Version

    0.2.4

    License

    MIT

    Unpacked Size

    4.96 kB

    Total Files

    6

    Last publish

    Collaborators

    • antfu
    • danielroe
    • clarkdo
    • pi0
    • atinux
    • alexchopin