0.0.1 • Published 9 years ago

unlogify v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

unlogify

logger for Frontend. unlogify will disable logs in production.

Install

$ npm i unlogify -S

How To

Unlogify is just a log wrapper.

const log = require('unlogify')();

log("hogehoge");
// => "hogehoge"

In Webpack build (or Other build system), set NODE_ENV=production for production build.

  plugins: [
    new webpack.DefinePlugin({
      'process.env.NODE_ENV': JSON.stringify('production')
    })
  ]

If NODE_ENV=production is set, unlogify will disable logs.

const log = require('unlogify')();

log("hogehoge");
// => Nothing

Lisence

MIT

0.0.1

9 years ago