Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Refactor kcs to use curl to download libs on the fly instead #12

Open
kamontat opened this issue Aug 15, 2024 · 0 comments
Open
Assignees
Labels
priority/unknown Unknown priority issue/feature stage/new Newly created issue

Comments

@kamontat
Copy link
Collaborator

kamontat commented Aug 15, 2024

Is your feature request related to a problem? Please describe

No response

Describe the solution you'd like

#!/usr/bin/env bash

# shellcheck source=/dev/null
source <(curl -sL 'https://github.com/kc-workspace/kcs/main/start.sh')

## Default tags @version, @setting, @main
_KCS_SCRIPT_ARGUMENTS=(
  @version main               # kcs version to set up (support main, latest, vx.x.x)
  @setting CACHE true         # set setting
  @setting MODE main          # support 'main' or 'command' mode
  @setting NAME hello         # set command name
  @setting VERSION v1.0.0     # set command version
  @load "$KCS_DEFAULT"        # add plugins, logger, color, support
  @main                       # executes _kcs_main_<setting.name> command on main action
  @plugin.load hook           # hook names: setup main cleanup post_cleanup finish
  @hook.new "$KCS_DEFAULT"    # add _kcs_hook_<hook-name>_<command-name>
  @hook.new setup custom_name # add _kcs_hook_setup_custom_name function to setup hook
  @plugin.load option
  @option.load "$KCS_DEFAULT"
  @option.load '-e,--example [str:hello]' 'EXAMPLE' 'show example message'
)

_KCS_SCRIPT_ARGUMENTS=(
  @version main
  @main
)

## _kcs_hook_<hook-name>_<command-name>
_kcs_hook_main_hello() {
  return 0
}

"$KCS_MAIN" "$@"

Describe alternatives you've considered

No response

Additional context

No response

@kamontat kamontat added priority/unknown Unknown priority issue/feature stage/new Newly created issue labels Aug 15, 2024
@kamontat kamontat self-assigned this Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/unknown Unknown priority issue/feature stage/new Newly created issue
Projects
None yet
Development

No branches or pull requests

1 participant