Ask coding questions

← Back to all posts
CLI
h
darkdarcool

Hi there!

I have been making a module for a while where it worked, and it was nice.

But since it's similar to jest, I want one more thing to be like it

When you run npx jest in the terminal, it gives you all your test, but I want mine to be:

So you don't have to require it

I got the executable part down, but I have no idea how to make it so chitchat can find a file, and make it so you don't have require it.

Can someone fork my project and show me how to do it? It would be great!

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
darkdarcool
Comments
hotnewtop
Coder100

what do you mean so you don't have to require it?

darkdarcool
Coder100

yeah what @darkdarcool

Coder100

wait a second
how about something like this:

right, that's what you want?

@darkdarcool

darkdarcool

@Coder100
where would I put that?

darkdarcool

@Coder100
plus I don't parse files, this is still just a module

Coder100

in the cli @darkdarcool

Coder100

@darkdarcool but still please explain what you mean by not having to require it not having to require anything sounds like a recipe for disaster to me... you don't know what the function comes from, and it is a good reminder to export your library!!

darkdarcool

@Coder100 lemme inv you to the repl and we can talk there

darkdarcool

@Coder100
There I can tell you more of what I want

darkdarcool

@Coder100
I fixed it! I'll mark you as correct!

Coder100

yay!! what did you do? @darkdarcool

darkdarcool

@Coder100
Changed name, and made replace stuff better!

darkdarcool

@Coder100
Since I can make flags, and found out how to execute bash, I have so many ideas !