Git Product home page Git Product logo

func's Issues

[Feature Request] docs site

Feature request 🚀

Expected:

  • a docs site, includes example / guide / api
  • support en and zh

Programme:

vuepress might be a good choice, but we also need to customize a set of themes.
or hugo?

Remove eslintConfig section in package.json of released func.

Feature request 🚀

Arguments

VSCode Typescript Def Jump to func code will trigger eslint error like this...

[Info  - 9:07:43 PM] ESLint server is running.
(node:44343) UnhandledPromiseRejectionWarning: Error: Failed to load config "eslint-config-ts-lambdas" to extend from.
Referenced from: /Volumes/Code/xxxxx/node_modules/func/package.json

Remove the eslintConfig section in package.json before release seems better?

Or this section been kept for some other reasons?

[Feature] Life cycle hook in all commands

Expected:

  • add life cycle hooks
  • include at least init
  • support async function
  • No breaking changes

Examples:

export class Command implements Init {
  async init(): void {}
}

Programme:

  • Add Init abstract class
  • Check the init hook at initialization and call it if it exists

Others:

  • Is it possible to capture exit code to achieve exit? (like user exit: command + c or error)

Support for values of parameters

Hi. Thanks for the neat little package. Been playing with it for some scripts I use personally I see it's quite handy.

I noticed that there's no information on whether func can handle values of parameters.

Example:

tools test --input something --output abcd

Expected output:

// console.log(arg.option)
{
  '--input': 'something',
  '--output': 'abcd'
}

Is this already available in some form that I am missing? If so please can you point me to it.

If not, please do think of adding this :)

[Optimize] reduce bundle size

Expected:

  • Further reduce the size of the package
  • No breaking changes

Programme:

  • Analyze bundle
  • Reduce the field length of metadata
  • Remove unused functions
  • Optimize some abstract designs

[Feature] Alias for command

Expected:

  • Call commands with alias
  • No breaking changes

Examples:

@Command({
  name: 'command',
  alias: 'c',
})
export class Command {
}

and
<name> command == <name> c

Programme:

  • Add param alias to command annotation
  • Check alias when command initial

Others:

  • There may be naming conflicts

[Feature Request] rename `CommandNotFound`

Feature request 🚀

Expected:

  • rename 'CommandNotFound' to 'CommandMissing'

Others:

  • missing is more semantic than notFound.
  • Changes can be implemented in next minor version.
  • NotFound will be retained until the next major version.

增强 help 命令能展示的信息

Feature request 🚀

func-service 的 help action 为例 https://github.com/unix/func-service/blob/master/src/options/help.ts

全局安装后运行 func-service --help 只会输出 command 和 option 相关信息。 与 command 绑定的 sub-option 信息无法输出。

+ func-service --help
FUNC-SERVICE

  build <command> --  pack all files
  dev <command> --  setup link

  --help -h <option> --  help
  --version -v <option> --  version

Expected:

+ func-service --help
FUNC-SERVICE

  build <command> --  pack all files
    --file -f <sub-option> -- ${possible subOption desc}
    --out -o <sub-option> -- ${possible subOption desc}
  dev <command> --  setup link
    --file -f <sub-option> -- ${possible subOption desc}

  --help -h <option> --  help
  --version -v <option> --  version

Programme:

#39

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.