Coder Social home page Coder Social logo

cmd's People

Contributors

acathur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

timo-klarshift

cmd's Issues

cdn not found

Hi there,

when I running your example from the readme I get the following error:

Download https://cdn.depjs.com/cmd/mod.ts
error: error sending request for url (https://cdn.depjs.com/cmd/mod.ts): error trying to connect: dns error: failed to lookup address information: Name or service not known

It seems the CDN is not longer available or registered by this domain

nslookup cdn.depjs.com 8.8.8.8               
Server:		8.8.8.8
Address:	8.8.8.8#53

** server can't find cdn.depjs.com: NXDOMAIN

Is there some alternative cdn I could use to use your package with deno?

Missing argument method

Since there is no argument method how can we specify a required argument for the default command?

Command.prototype.arguments returns `Command | undefined`

Hello, I don't know if this is an intentional API decision, but unlike .option, .description, etc the Command method .arguments returns undefined if no arguments were passed in. This makes sense for _parseExpectedArgs, for which .arguments is a thin wrapper, but it makes the typesafety of chaining difficult, since typescript will infer that the returned object may be undefined and not have a .description or .option method. I believe this would be an easy fix, but wanted to open an issue before submitting a PR

  arguments(desc: string): Command {
    return this._parseExpectedArgs(desc.split(/ +/)) || this;
  };

Positional arguments for function and defaults in Command.option and Command.requiredOption don't typecheck

The types defined for the function and default arguments do not allow for omitting the function argument in favour of a default, or using a regex instead of a function. The documentation suggests that this is allowed and it does work when type checking is disabled.

This issue seems to stem from trying to be clever with positional arguments. Just accepting an object with clearly typed fields {flags, doc?, fn?, regex?, default?} would address this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.