Skip to content

What to do when no arguments are passed? #34

@nixin72

Description

@nixin72

If no arguments are supplied to raco new, what would you expect to happen?

I think there are 3 options:

  1. Show the help command
  2. Show the list of available templates (this is what it's currently doing)
  3. Interactively create an info.rkt in the current repository

I don't think the current approach is the best idea, I think it'd be more useful to display the help page. I think the only reason it was done this way prior is because the CLI tool provides the help command automatically and it wasn't immediately obvious how to sort of "redirect" to it.

I'm not sure how much use case there might be for just creating an empty project with an info.rkt, but I was thinking this would be akin to npm init in a directory:

❯ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help init` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (test)
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to /Users/nixin72/Documents/repos/test/package.json:

{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}


Is this OK? (yes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions