vaderjs 1.3.3-7722242-hotfix → 1.3.3-7725242-hotfix
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/vader.js +9 -15
package/package.json
CHANGED
package/vader.js
CHANGED
|
@@ -479,7 +479,7 @@ function Compiler(func, file) {
|
|
|
479
479
|
|
|
480
480
|
let name = component.split("<")[1].split(">")[0].split(" ")[0].replace("/", "");
|
|
481
481
|
let componentAttributes = component.split("<")[1].split(">")[0].split(" ").join(" ").replace(name, "").trim();
|
|
482
|
-
const dynamicAttributesRegex = /(\w+)(?:="([^"]*?)"|='([^']*?)'|(?:=\{([^}]*?)\})?|(?:=\{(.*?)*\})?|(?:={([^}]*?)})?|(?:{([^}]*?)})?|(?:}))
|
|
482
|
+
const dynamicAttributesRegex = /(\w+)(?:="([^"]*?)"|='([^']*?)'|(?:=\{([^}]*?)\})?|(?:=\{(.*?)*\})?|(?:={([^}]*?)})?|(?:{([^}]*?)})?|(?:}))?|={\s*.*?\s*}/gs;
|
|
483
483
|
|
|
484
484
|
|
|
485
485
|
|
|
@@ -499,16 +499,8 @@ function Compiler(func, file) {
|
|
|
499
499
|
isWithinComponent = true;
|
|
500
500
|
filteredProps.push(prop);
|
|
501
501
|
} else if (isWithinComponent && prop.includes('=')) {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
let old = prop
|
|
505
|
-
prop = prop.replace(/\$\s*=\s*\{\s*\{\s*([^]*?)\s*\}\s*\}/gs, '$1')
|
|
506
|
-
component = component.replace(old, '')
|
|
507
|
-
componentAttributes = componentAttributes.replace(prop, '')
|
|
508
|
-
$_ternaryprops.push(prop)
|
|
509
|
-
|
|
510
|
-
}
|
|
511
|
-
else if (prop.includes('${')) {
|
|
502
|
+
|
|
503
|
+
if (prop.includes('${')) {
|
|
512
504
|
|
|
513
505
|
|
|
514
506
|
prop = prop.replace('="', ':')
|
|
@@ -527,14 +519,16 @@ function Compiler(func, file) {
|
|
|
527
519
|
if (prop.includes('={')) {
|
|
528
520
|
let value = prop.split('={')
|
|
529
521
|
let isObj = value[1].match(/^{.*}$/gs) ? true : false
|
|
530
|
-
if (!isObj) {
|
|
531
|
-
// remove trailing }
|
|
522
|
+
if (!isObj) {
|
|
532
523
|
value[1] = value[1].replace(/}\s*$/, '')
|
|
524
|
+
}else if(!value[0].length > 0 && isObj){
|
|
525
|
+
value[0] = '$'
|
|
533
526
|
}
|
|
527
|
+
|
|
534
528
|
|
|
535
529
|
if (value[0] == 'style' && isObj) {
|
|
536
530
|
value[1] = `this.parseStyle(${value[1]})`
|
|
537
|
-
}
|
|
531
|
+
}
|
|
538
532
|
prop = `${value[0]}:${value[1]}`
|
|
539
533
|
}
|
|
540
534
|
|
|
@@ -1239,7 +1233,7 @@ async function Build() {
|
|
|
1239
1233
|
scannedPublicFiles.forEach(async (file) => {
|
|
1240
1234
|
file = file.replace(/\\/g, '/');
|
|
1241
1235
|
file = file.split('/public/')[1]
|
|
1242
|
-
let data =
|
|
1236
|
+
let data = fs.readFileSync(process.cwd() + "/public/" + file);
|
|
1243
1237
|
bundleSize += fs.statSync(process.cwd() + "/public/" + file).size;
|
|
1244
1238
|
await writer(process.cwd() + "/dist/public/" + file, data);
|
|
1245
1239
|
})
|