How to overload the URL fetch in npm?

32 views
Skip to first unread message

Yuri Vic

unread,
Jun 29, 2015, 9:50:09 AM6/29/15
to nod...@googlegroups.com
I want to create the package for one nodejs-based project. All files that are required to be downloaded should be downloaded and fingerprinted before the npm can be started.

Is there the way URL fetch can be overloaded with my own JavaScript function, so I can see what URLs are being fetched, and to substitute requested tarballs with pre-fetched files?

Gustavo Machado

unread,
Jul 1, 2015, 1:33:36 PM7/1/15
to nod...@googlegroups.com
You might be able to use something like this: https://github.com/mixu/npm_lazy

Thanks,
Gus

On Sun, Jun 28, 2015 at 8:20 PM, Yuri Vic <yuri...@gmail.com> wrote:
I want to create the package for one nodejs-based project. All files that are required to be downloaded should be downloaded and fingerprinted before the npm can be started.

Is there the way URL fetch can be overloaded with my own JavaScript function, so I can see what URLs are being fetched, and to substitute requested tarballs with pre-fetched files?

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/d974e1d8-03cd-41d6-bded-546d6ee058d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages