A build-time script to optimize images. Note that going forward, all images should be placed in images instead of public/images.
This reverts commit f5adb69bdd.
This reverts commit 92eec34fa7.
I will revert that last commit before merging, after the PR has been approved.
This reverts commit b6cd0d3f35.
This reverts commit d977f3d65d.
The pipeline issues and memory errors should be hopefully be fixed now. I will revert that last commit before merging, after the PR has been reviewed and approved.
const SOURCE_DIRECTORY = "images";
const DESTINATION_DIRECTORY = path.join("public", "images");
const TEAM_IMAGES_DIRECTORY = path.join("team", "");
isn't this supposed to be path.join("images", "team")
getFilePathsInDirectory returns the paths of the files relative to the given directory, so the Meet the Team images would have filepaths like team/AdityaThakral.jpg. So the startsWith check on line 62 is checking to see if the filepath starts with team/.
can you add that as a comment in code?
lgtm after you add that comment
"dev": "next dev",
"build": "npm run build:web && npm run generate:calendar",
"dev": "npm run build:images && next dev",
Let's not do this everytime. Instead, if someone adds a new image, they should run this locally to see their image. You should also something about adding and optimizing images to the docs.
const imagePaths = await getFilePathsInDirectory(SOURCE_DIRECTORY);
const numberOfWorkers = Math.min(cpus().length, 8);
Can you leave a comment about the 8?
This reverts commit 658b2dafa9.
No due date set.
This pull request currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?