Skip to content

Add pub depend command #982

@DartBot

Description

@DartBot

<img src="https://avatars.githubusercontent.com/u/444270?v=3" align="left" width="96" height="96"hspace="10"> Issue by seaneagan
Originally opened as dart-lang/sdk#18911


It's nice to be able to tell someone to just run a command, instead of "add a foo dependency to your pubspec.yaml", especially for new dart users, and those using an editor without special pubspec.yaml editing support.

Similar to:

  npm install <name> [--save|--save-dev|--save-optional]

Could have:

  pub depend <package> [options]

  Options:

  --version -v Version_constraint (defaults to "any")
  --source -s One of git,hosted,path) # or just derive from <package> ?
  --dev -d Put in dev_dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions