pub icon indicating copy to clipboard operation
pub copied to clipboard

Add new command for creating a workspace from existing projects

Open FMorschel opened this issue 9 months ago • 2 comments

Now that pub workspaces are a thing, we should probably have an automated way of creating the outer pubspec.yaml for it and updating the projects pubspec.yaml to add resolution: workspace.

I'm not sure we need any information from the user besides what path to do this (not sure if anyone has a workspace folder with non-workspace projects inside or something), but maybe something to think about.

CC @DanTup

FMorschel avatar May 28 '25 04:05 FMorschel

not sure if anyone has a workspace folder with non-workspace projects inside or something

I also don't know how common this is, but if it was supported (for ex. allowing each project to be passed dart pub create-workspace ./ project1/ project2/ nested/project3) then IDEs could potentially show a pick-list of all the projects they've discovered in the workspace and let the user untick any that are not.

DanTup avatar May 28 '25 09:05 DanTup

Yeah - I think something like dart pub workspace add makes a lot of sense

sigurdm avatar May 28 '25 10:05 sigurdm