-
-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generate all asset aspect ratios on build #736
base: main
Are you sure you want to change the base?
generate all asset aspect ratios on build #736
Conversation
👷 Deploy Preview for virtual-coffee-io processing.
|
@JoeKarow still looking at this one, but added |
# Conflicts: # package.json # yarn.lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Joe -
Still working through this a bit and got stock on a weird eslint thing. See below...
'.webp', | ||
]; | ||
|
||
const getFiles = async (dir: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoeKarow I'm getting an eslint error here.
It looks like there's some weirdness with eslint/typescript and mts files.
I think there's something we can do about it but it might take some research.
We use @remix-run/eslint-config
which in turn uses typescript-eslint
(among other things).
There's a spot in remix's config where they list file types, and I can see mts is not included there:
This is as far as I got. It's possible we can add/adjust our eslint config to allow for this - I'm not exactly sure what that looks like.
const outputFile = path.resolve('app/_generatedData/aspectRatios.ts'); | ||
const inputDir = path.resolve('public/assets'); | ||
|
||
const supportedTypes = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we're using this to check file extensions as opposed to looking at the file contents, I think we should rename this supportedExtensions
We also should add '.jpg'
@JoeKarow are you still interested in working through this? I know it's been a while. No worries if you're not interested anymore. There have been some updates to the site and the dependencies that might have resolved some of the issues we were having, it's possible catching this branch up will fix that eslint issue. Let me know one way or the other, no worries if you'd like to pass it off. |
@danieltott I've been SWAMPED with work - if someone else could take this over, I'd be appreciative! |
@danieltott is this still something that needs worked on? |
Linked Issue
Closes #678
Description
Build script that generates aspect ratio definitions for all images in the
public/assets
directory. The script will also generate a Union Type of the SVG file names for use in theUndrawIllustration
component.MethodologyRandom GIFCode of Conduct