-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
Yo doesn't check parent directories for yo-rc.json
#1291
Comments
This is the [email protected] behavior.
|
@mshima Is there any way to get the intended behaviour? Otherwise, the whole deal with yo-rc.json doesn't seem to make sense to me, or the documentation about it is outdated |
Install and load 'find-up' package Add at your constructor something like:
|
I used the solution suggested by @mshima and found an incompleteness: the |
Type of issue: Bug
My environment
MacOs 11.13
14.16.1
(runnode --version
in your terminal)6.14.12
(runnpm --version
in your terminal)4.0.0
(runyo --version
in your terminal)Expected behavior
Yo correctly determines
tmp
(or whatever folder it was first run in) as the project root, and places files correctly even when run from a subdirectory. The subdirectory is not mistakenly marked as a new project root, the subdirectory does not mistakenly include ayo-rc.json
itself.Current behavior
tmp/files
, the following file structure occursSteps to reproduce the behavior
initialise
function as follows_initialise
in theinitializing
context. Generators create files either withthis.destinationRoot
or any configuration option in the confignpm link
tmp
tmp
tmp/files
. Config fileyo-rc.json
is created intmp
, marking project roottmp/subdir
subdir
The text was updated successfully, but these errors were encountered: