Skip to content
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

Make addAddonsToProject support creating a new project with custom target directory #10048

Merged
merged 1 commit into from Oct 20, 2022

Conversation

simonihmig
Copy link
Contributor

@simonihmig simonihmig commented Oct 14, 2022

As part of #9972 we (@ef4 specifically) made addAddonsToProject support to be called as part of generating a new project. However when we are calling the app blueprint programmatically and passing a custom options.target, it would try to install the requested dependencies in the wrong folder (not the one specified in options.target).

This popped up when trying to pass the --typescript flag in the v2 addon blueprint when creating the separate (TS enabled) test-app. Here we are operating in a monorepo, where the test-app is in a subfolder. When we delegate the test-app generation to the app blueprint here, its call to addAddonsToProject for ember-cli-typescript here would fail. The test-app would correctly be scaffolded in the right subfolder, however it would try to install ember-cli-typescript in the monorepo's root folder. Which is wrong, and which yarn would refuse to do.

@simonihmig simonihmig force-pushed the addAddonsToProject-custom-target branch from 866d3b8 to 2131cfa Compare October 14, 2022 14:04
@simonihmig simonihmig marked this pull request as ready for review October 14, 2022 14:04
@ef4 ef4 force-pushed the addAddonsToProject-custom-target branch from 2131cfa to ea7b66a Compare October 20, 2022 18:53
@ef4 ef4 enabled auto-merge October 20, 2022 18:59
@ef4
Copy link
Contributor

ef4 commented Oct 20, 2022

Thanks!

@ef4 ef4 merged commit 24ef75b into ember-cli:master Oct 20, 2022
@simonihmig simonihmig deleted the addAddonsToProject-custom-target branch October 21, 2022 07:22
simonihmig added a commit to embroider-build/addon-blueprint that referenced this pull request Jan 6, 2023
CI currently fails the typescript tests, due to a known issue that the latest stable version (4.9.x) of ember-cli support `--typescript`, but a fix when generating the app in a custom directory (ember-cli/ember-cli#10048) is only released for the 4.10.0-beta version. Se we use the latter in CI.
simonihmig added a commit to embroider-build/addon-blueprint that referenced this pull request Jan 6, 2023
CI currently fails the typescript tests, due to a known issue that the latest stable version (4.9.x) of ember-cli support `--typescript`, but a fix when generating the app in a custom directory (ember-cli/ember-cli#10048) is only released for the 4.10.0-beta version. Se we use the latter in CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants