-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
Clarify usage section in README.md
#3092
Conversation
Added missing steps, which I faced while installing it.
IIRC |
README.md
Outdated
@@ -64,7 +64,8 @@ then go to `http://localhost:8080`. | |||
## Usage | |||
|
|||
- Clone this repo. | |||
- Run with `cargo run -- test.js` where `test.js` is an existing JS file with any JS valid code. | |||
- Run `cargo build` | |||
- Run with `cargo run -- test.js` where `test.js` is an existing JS file with any JS valid code. The file has to be in the root directory. |
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 gives the person a clear idea to where the file should be added; it's worth mentioning.
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 gives the person a clear idea to where the file should be added; it's worth mentioning.
It doesn't have to be in the root dir, it just require a path to the file. so cargo run -- ../some-folder-outside-root/works.js
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.
@HalidOdat , you are correct. But if somebody changes the directory to the target folder, and then runs cargo-run
, then it will fail. I think, for better clarity, we should be mentioning it.
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.
Although, alternative suggestions are always welcome
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.
@HalidOdat , you are correct. But if somebody changes the directory to the target folder, and then runs
cargo-run
, then it will fail. I think, for better clarity, we should be mentioning it.
This, should be obvious, cargo
doesn't work if Cargo.toml
is not found (applies to pretty much every build system)
Although, alternative suggestions are always welcome
We can make it explicit:
"Run with cargo run -- test.js
in the project root directory where test.js
is a path to an existing JS file with any JS valid code."
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.
@HalidOdat I would request you to put suggestions in this PR. That would be helpful.
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 may be a bit more succinct to write.
- Run with `cargo run -- test.js` in the root directory where `test.js` is a path to any existing valid JS file.
Do we need to double reference JS file and valid JS code?
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.
Double reference is not needed.
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 may be a bit more succinct to write.
- Run with `cargo run -- test.js` in the root directory where `test.js` is a path to any existing valid JS file.
Do we need to double reference JS file and valid JS code?
It looks perfect.
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.
Hi, I have updated the steps as per the discussion. requesting for review and merge.
README.md
Outdated
@@ -64,7 +64,8 @@ then go to `http://localhost:8080`. | |||
## Usage | |||
|
|||
- Clone this repo. | |||
- Run with `cargo run -- test.js` where `test.js` is an existing JS file with any JS valid code. | |||
- Run `cargo build` |
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.
For the first time, to be on the safer side, I believe we should mention this step.
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.
I don't think this is needed, cargo
should always build if you run
(and it is not already built). If it doesn't, that means it is a bug in cargo
and should be reported in the cargo
repo https://github.com/rust-lang/cargo/
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.
Note that we should still remove the cargo build
part, since it's not needed and is adds complexity to the steps.
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.
Removed that part.
Updated steps as per discussion
Removed `cargo build` from the steps
Codecov Report
@@ Coverage Diff @@
## main #3092 +/- ##
==========================================
- Coverage 50.42% 50.40% -0.02%
==========================================
Files 444 436 -8
Lines 45877 42375 -3502
==========================================
- Hits 23132 21358 -1774
+ Misses 22745 21017 -1728 |
Textual Changes
Hey, can this be merged ? |
README.md
This reverts commit 0769260.
There were certain installation steps missing in the ReadMe file, which I added in order to get it corrected.