File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -8,16 +8,20 @@ AWKCMD='
88 {
99 # On first record
1010 if ( NR == 1) {
11- # Remove single quotes
12- gsub(/\047/, "");
11+ # Remove single OR double quotes
12+ gsub(/[ \047|\"] /, "");
1313 } else {
14- # Replace first single quote with (,)
15- sub(/\047/, ",", $4);
16- # Remove single quotes
17- gsub(/\047/, ""i, $4);
14+ # Replace first single OR double quote with (,)
15+ sub(/[\047|\"]/, ",", $4);
16+ # Remove single OR double quotes
17+ gsub(/[\047|\"]/, "", $4);
18+ # Remove COMPONENT_ID
19+ gsub(/[A-Z_{]*COMPONENT_ID[}]*/, "", $4);
20+ # Remove arrow functions
21+ gsub(/\(\{ [a-zA-Z]+ \}\)/, "", $4)
1822 }
1923 }
20- # Print second column only which contains component_id
24+ # Print fourth column only which contains component_id
2125 { print $4 }
2226'
2327grep \
2731 --include=\* .js \
2832 --exclude=\* .spec.js \
2933 -rn ' ../../packages' \
30- -e " \' data-garden-id\': \' " \
34+ -e " data-garden-id" \
3135 -e " const [A-Z_]*COMPONENT_ID =" |
3236 sort | # Sort alphabetically
3337 awk " $AWKCMD " | # Run the above awk program
You can’t perform that action at this time.
0 commit comments