A brief example on how to use npx
to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/ or watch it on YouTube https://www.youtube.com/watch?v=fSHWc8RTJug
A brief example on how to use npx
to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/ or watch it on YouTube https://www.youtube.com/watch?v=fSHWc8RTJug
#!/usr/bin/env node | |
console.log("I was executed from a gist inside the terminal with npx!"); |
{ | |
"name": "run-js-with-npx-from-gist", | |
"version": "1.0.0", | |
"bin": "./index.js" | |
} |
yes, truly amazing :)
hahaha this is great, thanks!
Amazing!! thanks
nice
@dagolinuxoid, @xerosanyam, @lantosgyuri, @robert-rae, @MohammadMojtabaRoshani-TOMaaR, @romualdovillalobos, @maan-singh
Thank you for the kind words, folks! I really hope it helped you!
Thanks for the explanation
Such an awesome feature I've never imagined the mere local command being capable of this! Thank you for this education!
It was really helpful for me as a new learner!!! thanks a lot!!
This example was extremely helpful! Thanks a lot :)
Is there any possibility to have arguments in the scripts which values are provided through options in the npx command?
Something like: npx <url-to-gist> --source ./path/to/source --dest ./path/to/dest
?
Thank you, @fredsced, @RyotaBannai, @mdn-cloud, @jonasmateus.
@lukaskoeller I don't know tbh, haven't tried that yet ^^
Thanks. This was helpful
I've read your article in russian from here
Thanks!
thanks!!
Thanks for the article!!
very nice, thanks
Thanks, @Temi-t, @sadvakasov, @jtello, @bennythejudge, @fesantossp, @ydjaghloul!
Super clear explanation and very helpful, thanks!
Thanks, @ashiquem!
I've also created a video on this subject if you prefer this format. You can check it out here:
Amazing!!! I tried with my gist and it is working like a charm!
You did a good job of explaining
npx