scope.macro

Adds useful build time console functions

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
scope.macro
1.0.05 years ago5 years agoMinified + gzip package size for scope.macro in KB

Readme

scope.macro
!Babel Macromacros-badgebabel-plugin-macros
This is a babel-plugin-macrosbabel-plugin-macros macro for babel-plugin-consolebabel-plugin-console.
Please see those projects for more information.

Installation

This module is distributed via npmnpm which is bundled with nodenode and should be installed as one of your project's devDependencies:
npm install --save-dev scope.macro

You'll also need to install and configure babel-plugin-macrosbabel-plugin-macros if you haven't already.

Usage

Once you've configured babel-plugin-macros you can import/require scope.macro. For example:
import scope from 'scope.macro'

function add100(a) {
  const oneHundred = 100
  scope('Add 100 to another number')
  return add(a, oneHundred)
}

function add(a, b) {
  return a + b
}