-
Notifications
You must be signed in to change notification settings - Fork 797
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
yarn flatten #745
yarn flatten #745
Conversation
Thanks Carlos 🙌 Screen.Recording.2024-02-28.at.9.44.56.PM.movFor some reason when I run just When I If the contract is small (eg. I removed import cc @Pabl0cks could you please give it a try, it might be something to do with my machine |
Oh weird! @technophile-04 What happens if you remove the redirect in the hardhat package.json? Do you get the full output in the console? |
yeah I do get full output in console if I remove redirect from package.json script |
no clue what might be 🤷♂️
With this removed in the package.json, does this work? |
Yup it creates Also if I put this in root package.json Does it properly work for you? Lets maybe work for @Pabl0cks to test, I will also try to debug till then 🙌 |
I guess it's an issue with redirect inside the package.json, since the redirection works fine in your system (
Yep, it works for me as it's. AN alternative could be to skip the redirection and just print out on stdout... and people can redirect themselves. |
GJ Carlos and Shiv!!
It's working fine to me, I get the same output with |
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.
Is working great to me, flattening all direct imports and imports into those imports
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.
I guess it's an issue with redirect inside the package.json
💯💯
Hmm after some digging turns out something to do with yarn version (might be how I have globally configured yarn
)
When I do yarn set version 1.22.19
It works nicely for me but for some reason it sets that version at project level :(
Demo Video
Screen.Recording.2024-02-29.at.11.52.41.AM.mov
AN alternative could be to skip the redirection and just print out on stdout
+1 for this, I think people can redirect themselves.... just to be safe, eg Autin intuitively doing here
But please free to merge as it ! Tysm Carlos, and Pablo for test 🙌
Will create a PR adding this into foundry 🙌
Autocompletion for SE-1 haha where it was printed in stdout Decided to remove the redirect in the script, in case someone else faces the same issue as Shiv |
Tysm merge this 🙌 |
yarn flatten
: Allow to flatten contracts into a single file.I think we could do the same in Foundry: https://book.getfoundry.sh/reference/forge/forge-flatten
Open to suggestions!