UNPKG
bundle-report
Version:
latest (1.2.2)
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0
1.0.0-beta.0
Track your bundle size over time
github.com/sethbattin/bundle-report
sethbattin/bundle-report
bundle-report
/
src
/
debug.js
11 lines
(7 loc)
•
250 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
const
{ warn } =
require
(
'prettycli'
)
let
debugMode =
false
if
(process.
argv
.
indexOf
(
'--debug'
) !== -
1
) debugMode =
true
const
debug
= (
label, data
) => {
if
(debugMode)
warn
(
`
${label}
:
${
JSON
.stringify(data,
null
,
2
)}
`
) }
module
.
exports
= debug