-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-dart-cliUse area-dart-cli for issues related to the 'dart' command like tool.Use area-dart-cli for issues related to the 'dart' command like tool.
Description
It'd be nice to have a new template or new command to bootstrap a pub workspace, both for a new workspace or in the current directory.
We'd like to use this in some future Dart and Flutter tutorials to streamline the instructions but I also expect it'd be useful for other developers.
dart create -t workspace <directory> [--packages-directory=<workspace packages root directory>] [--packages=<list of workspace package names>]
- Add a new
workspace
template.
- Creates the specified directory if it doesn't exist.
- If the specified directory doesn't have a
pubspec.yaml
, create it.
- Add an option to create the directory for packages
- It's long, but perhaps
--packages-directory
- Defaults to
pkgs/
orpackages/
(I'm not sure, butdart-lang
usespkgs/
)
- Add an option to create directories for specified sub packages
- Even though we used it for package configs in the past, I believe
--packages
would be the best option. - Creates directories for the packages in the
--packages-directory
from earlier. - Adds the packages directories to the
workspace
map in thepubspec.yaml
Related: #61238
\cc @sigurdm
ykmnkmi
Metadata
Metadata
Assignees
Labels
area-dart-cliUse area-dart-cli for issues related to the 'dart' command like tool.Use area-dart-cli for issues related to the 'dart' command like tool.