Having trouble properly implementing ShellJS
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 14.4k
- Forks
- 756
- PR merge metrics
- No merged PRs in 30d
Description
G'day guys, I'm so sorry to bother you with such a silly question, I was wondering if anyone could help me out with properly implementing Shelljs into my project, I'm very new to shelljs and a little bit confused on the documentation of how it's implemented, basically all I want to do is allow the Unix find command and it's configuration from my NodeJS app shown below, to work cross platform with Windows... Instead of it just working on Mac & Linux
exec('find -name "' + "file.txt" + '"', { cwd: randomFolder }, (error, stdout, stderr) => {
var filePath = stdout.substring(stdout.indexOf("./") + 2).trim("\n");
if (error !== null) {
console.Log("Cannot Locate the File...");
console.log();
return;
}
but I don't know how to properly implement shelljs here, can anyone please help me out with how this is done, I've been trying at this for a while now!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ShellJS documentation and the exec call shown in the issue, focusing on how the Unix find command is invoked from a NodeJS app. Determine whether ShellJS documents a cross-platform equivalent or whether the requested behavior needs a separate approach; done means the file lookup works on Windows as well as Mac and Linux.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs, shell
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100