create-typescript-app 2.12.0 → 2.12.1
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/lib/options/readLogo.js
CHANGED
|
@@ -4,12 +4,16 @@ async function readLogo(getReadme) {
|
|
|
4
4
|
if (!tag) {
|
|
5
5
|
return void 0;
|
|
6
6
|
}
|
|
7
|
+
const alt = /alt=['"](.+)['"]\s*src=/.exec(tag)?.[1].split(/['"]?\s*\w+=/)[0] ?? "Project logo";
|
|
8
|
+
if (/All Contributors: \d+/.test(alt)) {
|
|
9
|
+
return void 0;
|
|
10
|
+
}
|
|
7
11
|
const src = /src\s*=(.+)['"/]>/.exec(tag)?.[1]?.split(/\s*\w+=/)[0].replaceAll(/^['"]|['"]$/g, "");
|
|
8
|
-
if (!src) {
|
|
12
|
+
if (!src || src.includes("//img.shields.io")) {
|
|
9
13
|
return void 0;
|
|
10
14
|
}
|
|
11
15
|
return {
|
|
12
|
-
alt
|
|
16
|
+
alt,
|
|
13
17
|
src,
|
|
14
18
|
...readLogoSizing(src)
|
|
15
19
|
};
|