Skip to content

Commit

Permalink
Merge pull request #111 from happo/retry-only
Browse files Browse the repository at this point in the history
Add support for `only` init config
  • Loading branch information
trotzig authored Feb 6, 2024
2 parents c963055 + c1d7798 commit c7e3999
Show file tree
Hide file tree
Showing 3 changed files with 388 additions and 708 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-react": "^7.28.0",
"file-loader": "^3.0.1",
"happo.io": "^5.1.3",
"happo.io": "^9.0.0",
"jest": "^29.7.0",
"raw-loader": "^1.0.0",
"react": "^18.2.0",
Expand Down
7 changes: 7 additions & 0 deletions src/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ function filterExamples(all) {
return e.targets.includes(initConfig.targetName);
});
}
if (initConfig.only) {
all = all.filter(
(e) =>
e.component === initConfig.only.component &&
e.variant === initConfig.only.variant,
);
}
return all;
}

Expand Down
Loading

0 comments on commit c7e3999

Please sign in to comment.