babel-plugin-prefix-console-log

1.1.0 • Public • Published

babel-plugin-prefix-console-log

Travis-ci.com Build Status Travis-ci.org Build Status

This is a library that allows you to append to any amount of arguments in the console log. a Prefix. The default prefix is 'Bonify Rocks' where as you can specify in the .babelrc file the option prefix which will append the prefix that you would like to you console.log.

For additional information on babel plugins read the following

Read babel plugin handbook -> https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md

Try http://astexplorer.net/#/Pcw9baefXI for a visual understanding.

Special thank you to https://github.com/supreetpal/babel-plugin-boilerplate for the boilerplate work done. Thank you.

Example

In

console.log('Hello');

Out

console.log('Bonify RocksHello');

Installation

$ npm install babel-plugin-prefix-console-log

Usage

.babelrc

{
  "plugins": ["prefix-console-log", {
    "prefix": "Whatever you want "
  }]
}

Via CLI

$ babel --plugins prefix-console-log script.js

Via Node API

require("@babel/core").transform("code", {
  plugins: ["prefix-console-log"]
});

/babel-plugin-prefix-console-log/

    Package Sidebar

    Install

    npm i babel-plugin-prefix-console-log

    Weekly Downloads

    2

    Version

    1.1.0

    License

    none

    Unpacked Size

    8.01 kB

    Total Files

    18

    Last publish

    Collaborators

    • tomldac