-
-
Notifications
You must be signed in to change notification settings - Fork 420
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 print & REPL functionality to CLI #267
Conversation
Hey this looks great! |
/// CLI configuration for Boa. | ||
#[derive(Debug, StructOpt)] | ||
#[structopt(author, about)] | ||
struct Opt { | ||
/// The javascript file to be evaluated. | ||
#[structopt(name = "FILE", parse(from_os_str), default_value = "tests/js/test.js")] | ||
#[structopt(name = "FILE", parse(from_os_str))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if i understand it by default boa_cli will now be a shell, and we need to pass the file if we want to keep the same functionality as before?
Im personally OK with that as it matches up with Node etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup! It should be functionally equivalent. I just tested running node locally to check and passing no arguments (just calling node
) opens an interactive shell.
boa_cli/src/main.rs
Outdated
files: Vec<PathBuf>, | ||
/// Open a boa shell (WIP). | ||
/// Open a boa shell. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this option make sense now that shell is the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is now removed!
Do you mind updating the readme and maybe docs/debugging.md so that new users know to pass a file? Maybe show the argument boa takes or something like https://github.com/ogham/exa/blob/master/README.md#options or https://github.com/sharkdp/fd/blob/master/README.md#command-line-options |
I believe this should close #142 and should make some progress towards #74.
If this PR (gets accepted / is satisfactory) I can continue working on other features needed to complete #74.