-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Improved yarn rwt link, with selective copy #2122
Conversation
The error may not be related to anything we're doing, setting policies like this seems to help: yarnpkg/yarn#8405 |
packages/cli/src/redwood-tools.js
Outdated
@@ -81,7 +81,7 @@ export const fixProjectBinaries = (PROJECT_PATH) => { | |||
}) | |||
} | |||
|
|||
export const copyFiles = async (src, dest) => { | |||
export const copyFiles = async (src, dest, { skipChmod, silent } = {}) => { | |||
// TODO: Figure out if we need to only run based on certain events. |
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.
Ignore these changes, I'll take them out
packages/cli/src/redwood-tools.js
Outdated
addRedwoodFolderToGitIgnore() | ||
|
||
// Let workspaces do the link | ||
await execa('yarn build:link', [' -- -- --dest', projectPackagesPath], { |
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.
This is the key change
@@ -0,0 +1,72 @@ | |||
#!/usr/bin/env node |
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.
And this is how we're copying only relevant files, and using esbuild to build the framework. There must be some config missing in esbuild
@peterp ready for review. Unfortunately couldn't get esbuild to work, as we discussed, but hopefully in the future! |
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 trust whatever @dac09 wants to do ¯_(ツ)_/¯
Merging to test with canary, happy to revert if there's objections later |
@dac09 Forgot to ask --> does this change the "how to use" instructions/flow? |
Nope, non-breaking change :) Just make sure your local branch has the latest code from main merged :) |
Trying it now! |
Not working for me. Here's my process:
😢 |
There's a chance you will need to wait a little longer! I've noticed that the console output "stops" for a bit while it's doing something, then resumes. Best way is to wait till you see the box that tells you "your project is now linked!" (with 🚀 emoji ofcourse) Hope this fixes it for you!! |
^^ ha! This never displayed for me. I did give it quite awhile. Can try again. |
On my machine it takes about 90 odd seconds to build, maybe 30-60s to install and then it displays the box, and then starts the watcher. Not ideal, but works consistently for me so far. To speed things up a little you could pass If not, I'll try and fix in the morn! |
What?
As discussed, new workflow:
FRAMEWORK_PATH/packages/
toPROJECT_PATH/redwood
(crazy dashes for lerna)
This will only link the cli package. But I haven't exposed this in rwt cli.