在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:kgrz/babel-plugin-console-groupify开源软件地址:https://github.com/kgrz/babel-plugin-console-groupify开源编程语言:JavaScript 100.0%开源软件介绍:Console Groupify plugin for BabelScratching another itch with this. Sometimes when I'm developing in
React, I wish there was a way to group the This plugin checks for function aFunctionDeclaration () {
console.log('hi');
}
const aFunctionExpression = function () {
console.log('hi')
}
const anArrowFunction = () => {
console.log('hi')
} ends up looking like:
Combining this with the https://github.com/kgrz/babel-plugin-transform-console-log-variable-names, the printf-debugging becomes way better. For example, in a React component: class MyComponent extends React.Component {
componentWillReceiveProps ( nextProps ) {
console.log(this.props);
console.log(nextProps);
}
} prints out:
Actual screenshot from actual usage: Note that both these plugins are at a pretty alpha quality. UsageInstall the module with:
Include it in your babel configuration either via {
"presets": [...],
"plugins": [
"console-groupify"
]
} Known Issues
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论