Skip to content

Add init command to more easily set up a new project #2

Open
@xt0rted

Description

@xt0rted

This should do a couple things:

  1. If a global.json doesn't exist in the executing folder create one
  2. Add a scripts section with a simple echo "hello world" type script

It could also accept a --template <template> option which would add pre-configured scripts. The default one could be something like this:

{
  "scripts": {
    // Debug mode scripts
    "build": "dotnet build",
    "test": "dotnet test",
    "pack": "dotnet pack --output ./artifacts",
    "ci": "dotnet r build && dotnet r test && dotnet r pack",

    // Release mode scripts
    "build:release": "dotnet build --configuration Release",
    "test:release": "dotnet test --configuration Release --no-build",
    "pack:release": "dotnet pack --configuration Release --no-build --output ./artifacts",
    "ci:release": "dotnet r build:release && dotnet r test:release && dotnet r pack:release",
  }
}

Should this be init and only available if no global.json or scripts section are found, or should it be a flag --init and always visible?

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