babel-plugin-transform-iife-for-debug
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "babel-plugin-transform-iife-for-debug", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -11,10 +11,12 @@ const DEBUGGER_TAG = ' @IIFE-for-debug'; | ||
let expStm = path.parentPath; | ||
let lc = expStm.node.leadingComments; | ||
if(lc.length) { | ||
lastComment = lc[lc.length - 1]; | ||
if(lastComment.value === DEBUGGER_TAG) { | ||
// 注释与箭头函数位置紧挨在一起 | ||
if(isSticked(lastComment, path.node)) { | ||
let IIFE_Expression = t.callExpression(path.node, []); | ||
expStm.node.expression = IIFE_Expression; | ||
if(expStm && expStm.node) { | ||
let lc = expStm.node.leadingComments || []; | ||
if(lc.length) { | ||
lastComment = lc[lc.length - 1]; | ||
if(lastComment.value === DEBUGGER_TAG) { | ||
// 注释与箭头函数位置紧挨在一起 | ||
if(isSticked(lastComment, path.node)) { | ||
let IIFE_Expression = t.callExpression(path.node, []); | ||
expStm.node.expression = IIFE_Expression; | ||
} | ||
} | ||
@@ -21,0 +23,0 @@ } |
@@ -21,6 +21,5 @@ | ||
// @IIFE-for-debug | ||
() => { | ||
(() => { | ||
test; | ||
}; | ||
})(); | ||
} | ||
@@ -27,0 +26,0 @@ |
@@ -21,3 +21,2 @@ | ||
// @IIFE-for-debug | ||
() => { | ||
@@ -24,0 +23,0 @@ test |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3448
86