1.0.3 • Published 2 years ago
say-log v1.0.3
say-log
Eliminate console logs from production code, the easy way.
Setup
Make sure your node setup has NODE_ENV as an environment variable during production.
The package checks for process.env.NODE_ENV === 'production'
If unsure, manually create a .env file and add NODE_ENV=production
OR
Use
NODE_ENV=production node app.js
during production build.
Installation
Using npm
npm install say-log
Using yarn
yarn add say-log
Usage
import say from 'say-log'
# console log only to development
say.log('Hello from development')
# console log even in production
say.prod('Hello from production')
# console.error replacement
say.error('Error')
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.