magix-combine
Advanced tools
Comparing version 3.11.59 to 3.11.60
@@ -0,1 +1,4 @@ | ||
## 3.11.60 | ||
1. 模板中`optional chaining`支持 | ||
## 3.11.59 | ||
@@ -2,0 +5,0 @@ 1. 更新依赖 |
{ | ||
"name": "magix-combine", | ||
"version": "3.11.59", | ||
"version": "3.11.60", | ||
"description": "合并Magix View的html,js,css成一个js文件,并检测html,js,css中可能存在的问题", | ||
@@ -19,3 +19,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"acorn": "8.7.x", | ||
"acorn": "8.8.x", | ||
"acorn-walk": "8.2.x", | ||
@@ -30,3 +30,3 @@ "autoprefixer": "10.4.x", | ||
"string-width": "4.2.x", | ||
"typescript": "4.7.x", | ||
"typescript": "5.0.x", | ||
"clean-css": "5.3.x", | ||
@@ -41,2 +41,2 @@ "fs-extra": "10.1.x" | ||
"homepage": "https://github.com/thx/magix-combine#readme" | ||
} | ||
} |
@@ -125,3 +125,16 @@ /* | ||
fileContent = fileContent.replace(htmlCommentCelanReg, '').trim(); | ||
let gId; | ||
if (configs.tmplOptionalChainingSupport) { | ||
gId = utils.uId('\x00', fileContent); | ||
fileContent = gId + fileContent; | ||
} | ||
fileContent = tmplCmd.compile(fileContent); | ||
if (configs.tmplOptionalChainingSupport) { | ||
let i = fileContent.indexOf(gId); | ||
let prefix = fileContent.substring(0, i); | ||
fileContent = fileContent.substring(i + gId.length); | ||
if (prefix) { | ||
fileContent = `<%${prefix}%>` + fileContent; | ||
} | ||
} | ||
let refTmplCommands = Object.create(null); | ||
@@ -128,0 +141,0 @@ e.refLeakGlobal = { |
@@ -109,2 +109,3 @@ // let classReg = /\bclass\s*=\s*"[^"]+/; | ||
tmplSnippetInScript: false, | ||
tmplOptionalChainingSupport: false,//?.模板中的支持 | ||
disableMagixUpdater: false, | ||
@@ -111,0 +112,0 @@ magixVframeHost: false, |
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
552866
13469
+ Addedacorn@8.8.2(transitive)
+ Addedtypescript@5.0.4(transitive)
- Removedacorn@8.7.1(transitive)
- Removedtypescript@4.7.4(transitive)
Updatedacorn@8.8.x
Updatedtypescript@5.0.x