@nuxtjs/plugin-utils
[![npm](https://img.shields.io/npm/dt/@nuxtjs/plugin-utils.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/plugin-utils) [![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/plugin-utils/latest.svg?style=flat-square)](https://npmjs.com
Last updated a year ago by pi0 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nuxtjs/plugin-utils 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.2.4                                ...           latest (a year ago)

6 Versions

  • 0.2.4                                ...           a year ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 2
Last Month 1
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |