5 ms·
I know it's javascriptjanuary.com but having this: > node -e require('https').get('https://gist.githubusercontent.com/PurpleBooth/109311bb0361f32d87a2/raw/824d
by Promarged 9y ago
I know it's javascriptjanuary.com but having this:
> node -e require('https').get('https://gist.githubusercontent.com/PurpleBooth/109311bb0361f32d87a2/raw/824da51d0763e6855c338cc8107b2ff890e7dd43/README-Template.md' https://gist.githubusercontent.com/PurpleBooth/109311bb0361f..., b => b.on('data', c => process.stdout.write(c+'')))" > README.md
instead of plain curl seems weird to me.
- leipert 9y agoEspecially as he mentioned the Unix Philosophy: > [...], try to remember the Unix Philosphy [sic] and break it down into tiny parts that go well together, this way it's going to be way easier to initially release it and maintain it in the future.
- steinuil 9y agoThe unix philosophy != command line tools usually preinstalled on your system.
- yipopov 9y agoMaybe it's aimed at Windows users who may not have curl installed.
- nerdponx 9y agoCan you 'npm i -g curljs' yet?
- lucideer 9y agoWell, as you say, it IS javascriptjanuary.com, but I was more put off by the fact it seems it'd be nicer as this: node -e "require('https').get(url, b => b.pipe(process.stdout)))" > README.md rather than this: node -e require('https').get(url, b => b.on('data', c => process.stdout.write(c+'')))" > README.md (and also that there's a typo with the quoting at the beginning).
- seangrogg 9y agoHonestly, as an engineer that enjoys using JS and often writes cute little scripts using Node.js I fully agree that curl seems like a much better fit here.