You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2018. It is now read-only.
I have to bundle my application code, as well as the http-proxy module, into a zip file in order to upload to my server (eg. aws lambda, or my server doesn't have internet access).
I don't want to zip up all 140 directories inside of node_modules when creating my deployment package. Instead, I want to only zip up my application code, http-proxy, and http-proxy's dependencies (eventemitter3, requires-port).
Is there a programmatic way to query npm in order to return an array of folders based on an array of modules?
In this example: getFoldersFor(['http-proxy']) -- or something --
where it would return: ['http-proxy', 'eventemitter3', 'requires-port']
so I could then only zip up those 3 folders into my application's deployment package (zip).
bundledDependencies looks like it is only for npm publishing, so that probably won't work directly.
With npm2, this was easy, as everything was nested. With npm3, there's no documented way of doing this.
Thanks!
The text was updated successfully, but these errors were encountered:
synthe
changed the title
Programmatic access to folder for subset of modules
Programmatic access to folders for subset of modules
Dec 29, 2015
I have the following scenario:
I have to bundle my application code, as well as the http-proxy module, into a zip file in order to upload to my server (eg. aws lambda, or my server doesn't have internet access).
I don't want to zip up all 140 directories inside of node_modules when creating my deployment package. Instead, I want to only zip up my application code, http-proxy, and http-proxy's dependencies (eventemitter3, requires-port).
Is there a programmatic way to query npm in order to return an array of folders based on an array of modules?
In this example:
getFoldersFor(['http-proxy'])
-- or something --where it would return:
['http-proxy', 'eventemitter3', 'requires-port']
so I could then only zip up those 3 folders into my application's deployment package (zip).
bundledDependencies looks like it is only for npm publishing, so that probably won't work directly.
With npm2, this was easy, as everything was nested. With npm3, there's no documented way of doing this.
Thanks!
The text was updated successfully, but these errors were encountered: