-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix(storybook): proper detection of e2e project existence #13635
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
4cb3626
to
9200db2
Compare
9200db2
to
3810025
Compare
packages/storybook/src/generators/configuration/util-functions.ts
Outdated
Show resolved
Hide resolved
packages/storybook/src/generators/configuration/util-functions.ts
Outdated
Show resolved
Hide resolved
965112f
to
4a00597
Compare
packages/storybook/src/generators/configuration/util-functions.ts
Outdated
Show resolved
Hide resolved
4a00597
to
ec29658
Compare
ec29658
to
4159d6c
Compare
packages/storybook/src/generators/configuration/util-functions.ts
Outdated
Show resolved
Hide resolved
4159d6c
to
b6f8e6d
Compare
forEachExecutorOptions( | ||
tree, | ||
'@nrwl/cypress:cypress', | ||
(options, projectName) => { | ||
if (e2eProject) { | ||
return; | ||
} | ||
if (options['devServerTarget']) { | ||
const { project, target } = parseTargetString( | ||
options['devServerTarget'] | ||
); | ||
if ( | ||
(project === mainProject && target === 'serve') || | ||
(project === mainProject && target === 'storybook') | ||
) { | ||
e2eProject = projectName; | ||
} | ||
} | ||
} | ||
); | ||
return e2eProject; |
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.
@FrozenPandaz should we add some utils in @nrwl/devkit to handle this better? something like:
findProjectWithTarget(executor?: name, searchFn: (TargetConfiguration) => boolean)
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.
Yeah @AgentEnder , we talked about this last week. The forEachExecutorOptions
can be used to achieve this at the moment. If we decide to add another function, though, I'll be happy to write it! :D
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.
My suggestion was findBuildTarget
, or something similar, to get the name of various targets. But since the callback in forEachExecutorOptions
essentially can be used for that, we said that it's better to keep the one. Mind you, I still have to refactor all the places I've created my own "findTarget" functions :P
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Nrwl/Storybook would not generate e2e project for standalone app. Now we are detecting existence of e2e project properly.