Skip to content

Allow custom cli commands to be defined #251

@bhouston

Description

@bhouston

The idea is in the mycoder.config.js one can define a command as a name and a number of args and then a string that includes some syntax for including the args. I wonder if since my config file is JavaScript I could make this an optional function? But I am not sure cosmiconfig supports actual JavaScript in the results from a config load.

So if that isn't supported I should just use an arg insertion syntax. I guess even if JavaScript function import is supported I still want the simple text format as well.

We should validate on load that the number of args match the expected number and there are no accesses past the number of allowed args.

I guess we could call this scripts or commands or shortcuts. In many ways it is like the script entry points in package.json. Can someone suggest some names?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions