docs: correct the fallback wording and the install commands - #36
Merged
Conversation
The `format` order decides the fallback only when the source format is not in the list, so a jpg source with `["avif", "jpg"]` still hands out the jpg. `@srcset/runtime` is a peer dependency that ships to the browser, so the plugin and the loader install it as a regular one rather than a dev one. The component packages link to the single `/components/` page, and `@srcset/bundler-utils` to the site root: it is internal to the integrations and has no page of its own.
Coverage Report for CI Build 33630561742Coverage remained the same at 93.871%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three corrections across the package READMEs.
The fallback.
// First format is the fallback: default export and srcwas wrong as stated. The default export points at the variant in the source format at the source width; the first format of the list takes that role only when the source format is not in the list. Verified by running the cli:-f avif,jpgon a jpg source yields the jpg,-f webp,avifyields the webp. The comment now says why jpg is in the list rather than why it is first.@srcset/runtimeis not a dev dependency. It is a peer dependency of every integration and adapter, and it ships to the browser, sopnpm add -D @srcset/vite-plugin @srcset/runtimewas wrong. The plugin and loader READMEs now install them separately, with a line saying why. The other six READMEs already had it right.Two links. The component packages pointed at
/components/react/,/components/preact/and/components/svelte/; the documentation has one/components/page for all three.@srcset/bundler-utilspointed at/api/bundler-utils/, which will not exist - it is internal to the integrations and gets no page.