Skip to content

Support for argument placeholders #45

@xt0rted

Description

@xt0rted

This is similar to how npm-run-all supports this and will allow passing values to different parts of the script.

  • {1}, {2}, ... - An ordered argument quoted
  • {@} - All arguments individually quoted
  • {*} - All arguments joined with spaces and quoted as a single value

An example of this:

{
  "scripts": {
    "migration": "dotnet ef migrations add {1} --project \"./src/Acme.Data\" --startup-project \"./src/Acme.Web\""
  }
}

A placeholder technically isn't needed in this example since the name can be passed at the end but it's still a valid example.

> dotnet r migration -- "A cool new feature"

npm-run-all has support for default values using the syntax {1:-foo} where if no parameters are passed then foo is used in that spot. You can also specify a "global" default using the syntax {1:=foo} where that instance and every subsequent instance of {1} will also be foo. Both of these features are out of scope for the initial implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions