Make addAddonsToProject support creating a new project with custom target directory #10048
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.
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 customoptions.target
, it would try to install the requested dependencies in the wrong folder (not the one specified inoptions.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 toaddAddonsToProject
forember-cli-typescript
here would fail. The test-app would correctly be scaffolded in the right subfolder, however it would try to installember-cli-typescript
in the monorepo's root folder. Which is wrong, and which yarn would refuse to do.