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

[WIP] Add CLI Support #57

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

arggrande
Copy link

@arggrande arggrande commented Apr 26, 2021

  • Add yargs for CLI parsing
  • Identify the functions that need to be exported/imported from the main codebase
    • Firewall.prototype.exec
    • getServersFile
    • loadMainFiles
      • Potentially replace this with a bundler
    • PingWrapper.prototype._updateClusterStatus
  • Create the CLI commands needed for this to work and identify basic usage commands
    • csgo-mm-picker - basic usage command, to be registered on the PATH for global execution
    • reset - Resets all CSGO rules from the relevant firewall
    • list - lists all the servers and relevant pings
    • set - sets a given server to the 'chosen' server
    • ping will ping a given region/cluster
    • Double check cross-platform support
      • Windows
      • MacOS
      • Linux
  • Add a new entry point for the app, called cli-main.js
    • Check how the current installation works for packaging (the docs have the dist command)
    • Add a new package call/script for the packaging of the cli.exe
      • How do we add to the PATH variables?
    • Look at registering a new package on NPM, called csgo-mm-picker-cli
  • Docs
    • CLI functions should all have good self-documentation
  • Update the README with the example usages

@arggrande
Copy link
Author

I may do a bit of refactoring on some of some of those functions that handle the cluster/firewall/ping processing to remove the dependency on the electron stuff, so we can use it in the CLI, otherwise I'd have to re-write the functions from scratch, which seems like a waste :)

@arggrande
Copy link
Author

I've still got quite a bit of work to do on this, but I'm happy to address any feedback you may have as I go along! ^_^

@arggrande
Copy link
Author

Just to give an update: I'm still working on this, however I've been a bit stretched for time (and energy lol), so I'll be setting aside some time this weekend to continue working on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant