@dcloudio/uni-cli-shared
Advanced tools
Comparing version 0.2.933 to 0.2.934
@@ -103,2 +103,36 @@ /** | ||
function updateComponentGenerics (name, componentGenerics) { | ||
const oldJsonStr = getJsonFile(name) | ||
if (oldJsonStr) { // update | ||
const jsonObj = JSON.parse(oldJsonStr) | ||
jsonObj.componentGenerics = componentGenerics | ||
const newJsonStr = JSON.stringify(jsonObj, null, 2) | ||
if (newJsonStr !== oldJsonStr) { | ||
updateJsonFile(name, newJsonStr) | ||
} | ||
} else { // add | ||
const jsonObj = { | ||
componentGenerics | ||
} | ||
updateJsonFile(name, jsonObj) | ||
} | ||
} | ||
function updateGenericComponents (name, genericComponents) { | ||
const oldJsonStr = getJsonFile(name) | ||
if (oldJsonStr) { // update | ||
const jsonObj = JSON.parse(oldJsonStr) | ||
jsonObj.genericComponents = genericComponents | ||
const newJsonStr = JSON.stringify(jsonObj, null, 2) | ||
if (newJsonStr !== oldJsonStr) { | ||
updateJsonFile(name, newJsonStr) | ||
} | ||
} else { // add | ||
const jsonObj = { | ||
genericComponents | ||
} | ||
updateJsonFile(name, jsonObj) | ||
} | ||
} | ||
function getComponentSet () { | ||
@@ -114,3 +148,5 @@ return componentSet | ||
updateUsingComponents, | ||
updateComponentGenerics, | ||
updateGenericComponents, | ||
getChangedJsonFileMap | ||
} |
{ | ||
"name": "@dcloudio/uni-cli-shared", | ||
"version": "0.2.933", | ||
"version": "0.2.934", | ||
"description": "uni-cli-shared", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
35658
827