You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to provide a link to a Storybook.
Scooby can then access the Storybook, iterate over all of the stories and store the HTML to then compare as it does normally.
Here's a flow for what this could look like
%% Flowchart
graph TD
A[Run CLI]-->B{Is path a URL?}
B-->|Yes|C{Is Storybook URL}
B-->|No|D[Continue current flow...]
C-->|Yes|E[Access Storybook's iframe.html]
C-->|No|F[Access URL]
E-->G[Get stories data*]
G-->H[Create a list of story URLs to visit**]
H-->I[Access the story URL]
I-->J[Get HTML for Story***]
J-->K[Save HTML to file]
F-->K
K-->D
Loading
We can get this via global STORYBOOK_STORY_STORE (or something similar). And then the getStoriesJSONData function
** - URL of the stories equal to the key of the story in the JSON object.
e.g.,
const data = getStoriesJSONData;
// result
{
"components-button--large": { ... }
}
const url = new URL("iframe.html", "https://linktostory.com")
url.searchParams.append("id", "components-button--large")
const fullUrl = url.href
*** - We'll need to figure out how to pull out only the markup that we need.
Unknowns
How will we handle styles?
How can we determine which Storybook markup we need, and which we can discard?
The text was updated successfully, but these errors were encountered:
It would be great to provide a link to a Storybook.
Scooby can then access the Storybook, iterate over all of the stories and store the HTML to then compare as it does normally.
Here's a flow for what this could look like
getStoriesJSONData
function** - URL of the stories equal to the key of the story in the JSON object.
e.g.,
*** - We'll need to figure out how to pull out only the markup that we need.
Unknowns
The text was updated successfully, but these errors were encountered: