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

Add support for importing srcbooks from the hub #180

Merged
merged 1 commit into from
Aug 15, 2024
Merged

Conversation

benjreinhart
Copy link
Contributor

This PR:

  1. Introduces a more robust CLI with support for importing srcbooks from https://hub.srcbook.com.
  2. Removes the hardcoded localhost urls in the web package, which now means that we can configure port and leverage localhost aliases

CLI Examples:

npx srcbook start
npx srcbook start --port 5000   # or -p

npx srcbook import <hub-id>
npx srcbook import <hub-id> -p 5000  # or --port

Main CLI help menu

Usage: srcbook [options] [command]

Srcbook is a interactive programming environment for TypeScript

Options:
  -V, --version                 output the version number
  -h, --help                    display help for command

Commands:
  start [options]               Start the Srcbook server
  import [options] <specifier>  Import a Srcbook
  help [command]                display help for command

import command help menu

Usage: srcbook import [options] <specifier>

Import a Srcbook

Arguments:
  specifier          An identifier of a Srcbook on hub.srcbook.com

Options:
  -p, --port <port>  Port of the server (default: "2150")
  -h, --help         display help for command

@benjreinhart benjreinhart requested a review from nichochar August 15, 2024 19:46
@benjreinhart benjreinhart merged commit bc3a612 into main Aug 15, 2024
1 check passed
@benjreinhart benjreinhart deleted the hub-import branch August 15, 2024 20:07
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