We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e792fdc commit 68e68f0Copy full SHA for 68e68f0
lib/comment.js
@@ -75,8 +75,17 @@ async function printCDNTable(names) {
75
if (!names.includes(name) || !file) continue;
76
const version = newPlugins[name];
77
const links = getVendors({ ...value, version, minified: file });
78
+ const path = `./node_modules/${name}/${file}`;
79
+ const fileExists = fs.existsSync(path);
80
+ if (!fileExists) {
81
+ console.log(`
82
+## ${name}
83
+
84
+The file \`${file}\` does not exist.`);
85
+ continue;
86
+ }
87
const integrity = await ssri
- .fromStream(fs.createReadStream(`./node_modules/${name}/${file}`), { algorithms: ['sha256'] });
88
+ .fromStream(fs.createReadStream(path), { algorithms: ['sha256'] });
89
await formatTable(key, links, integrity.toString());
90
}
91
0 commit comments