Skip to content

Commit 5bc0a47

Browse files
petebacondarwinmhevery
authored andcommitted
refactor(docs-infra): remove image size exclusion list (angular#41292)
In angular#41253 the size of contributor images was limited, but some images were already too large. So an exclusion list was added. These images have now been reduced, so the exclusion list is no longer needed. The files were reduced by a combination of running them through the https://tinyjpg.com/ online service and manually setting their size to 168px wide or tall using the MacOS Image Preview app. PR Close angular#41292
1 parent 2548921 commit 5bc0a47

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

aio/scripts/contributors/validate-data.js

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// Imports
44
const {existsSync, readFileSync, statSync} = require('fs');
5-
const {basename, join, resolve} = require('path');
5+
const {join, resolve} = require('path');
66

77
// Constants
88
const MAX_IMAGE_SIZE = 30 * 1024; // 30kb
@@ -11,18 +11,6 @@ const IMAGES_DIR = join(CONTENT_DIR, 'images/bios');
1111
const CONTRIBUTORS_PATH = join(CONTENT_DIR, 'marketing/contributors.json');
1212
const EXISTING_GROUPS = new Set(['Angular', 'GDE', 'Collaborators']);
1313

14-
// The list of profile images that exceed specified `MAX_IMAGE_SIZE` limit.
15-
// These images were added before the size check was introduced. Exclude these images
16-
// from size check for now, but still check other images (more importantly run the check
17-
// for new PRs where profile images are added).
18-
const EXCLUDE_FROM_SIZE_CHECK = new Set([
19-
'alainchautard.png', 'ahsanayaz.jpg', 'alan-agius4.jpg', 'andrew-kushnir.jpg',
20-
'brian-love.jpg', 'cexbrayat.jpg', 'christianliebel.jpg', 'patovargas.png', 'gerardsans.jpg',
21-
'jessicajaniuk.jpg', 'JiaLiPassion.jpg', 'juristr.jpg', 'katerina.jpg', 'kimmaida.jpg',
22-
'kyliau.jpg', 'lacolaco.jpg', 'leonardo.jpg', 'nirkaufman.jpg', 'sajee.jpg', 'sonukapoor.jpg',
23-
'tracylee.jpg', 'twerske.jpg', 'wesgrimes.jpg'
24-
]);
25-
2614
// Run
2715
_main();
2816

@@ -43,9 +31,7 @@ function _main() {
4331
}
4432

4533
// Check that there are no images that exceed the size limit.
46-
const tooLargeImages = expectedImages
47-
.filter(path => !EXCLUDE_FROM_SIZE_CHECK.has(basename(path)))
48-
.filter(path => statSync(path).size > MAX_IMAGE_SIZE);
34+
const tooLargeImages = expectedImages.filter(path => statSync(path).size > MAX_IMAGE_SIZE);
4935
if (tooLargeImages.length > 0) {
5036
throw new Error(
5137
`The following pictures exceed maximum size limit of ${MAX_IMAGE_SIZE / 1024}kb:` +

0 commit comments

Comments
 (0)