Skip to content

Instantly share code, notes, and snippets.

@Tynael

Tynael/README.md

Last active Sep 9, 2020
Embed
What would you like to do?
How to use npx to run gist based scripts
#!/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"
}
@dagolinuxoid

This comment has been minimized.

Copy link

@dagolinuxoid dagolinuxoid commented Jan 24, 2020

You did a good job of explaining npx

@xerosanyam

This comment has been minimized.

Copy link

@xerosanyam xerosanyam commented Jan 25, 2020

yes, truly amazing :)

@lantosgyuri

This comment has been minimized.

Copy link

@lantosgyuri lantosgyuri commented Feb 4, 2020

🎉 🎉 🎉 Thanks for this article!

@robert-rae

This comment has been minimized.

Copy link

@robert-rae robert-rae commented Feb 13, 2020

hahaha this is great, thanks!

@MohammadMojtabaRoshani-TOMaaR

This comment has been minimized.

Copy link

@MohammadMojtabaRoshani-TOMaaR MohammadMojtabaRoshani-TOMaaR commented Mar 5, 2020

👍👍👍

@romualdovillalobos

This comment has been minimized.

Copy link

@romualdovillalobos romualdovillalobos commented Mar 10, 2020

Amazing!! thanks

@maan-singh

This comment has been minimized.

Copy link

@maan-singh maan-singh commented Apr 12, 2020

nice

@Tynael

This comment has been minimized.

Copy link
Owner Author

@Tynael Tynael commented Jun 5, 2020

@dagolinuxoid, @xerosanyam, @lantosgyuri, @robert-rae, @MohammadMojtabaRoshani-TOMaaR, @romualdovillalobos, @maan-singh
Thank you for the kind words, folks! I really hope it helped you!

@fredsced

This comment has been minimized.

Copy link

@fredsced fredsced commented Jun 13, 2020

Thanks for the explanation

@RyotaBannai

This comment has been minimized.

Copy link

@RyotaBannai RyotaBannai commented Jun 21, 2020

Such an awesome feature I've never imagined the mere local command being capable of this! Thank you for this education!

@mdn-cloud

This comment has been minimized.

Copy link

@mdn-cloud mdn-cloud commented Jul 15, 2020

It was really helpful for me as a new learner!!! thanks a lot!!

@jonasmateus

This comment has been minimized.

Copy link

@jonasmateus jonasmateus commented Aug 23, 2020

This example was extremely helpful! Thanks a lot :)

@lukaskoeller

This comment has been minimized.

Copy link

@lukaskoeller lukaskoeller commented Sep 4, 2020

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?

@Tynael

This comment has been minimized.

Copy link
Owner Author

@Tynael Tynael commented Sep 9, 2020

Thank you, @fredsced, @RyotaBannai, @mdn-cloud, @jonasmateus.

@lukaskoeller I don't know tbh, haven't tried that yet ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.