jspm / npm

NPM Location Service
19 stars 34 forks source link

Nodelibs to have lower config / install overhead #29

Closed guybedford closed 9 years ago

guybedford commented 9 years ago

Adding crypto makes nodelibs a 10 package install, which can easily be seen as overkill for a simple app, and detracts from the configuration simplicity for model cases, which is important to keep.

Ideally we could detect specific node core libs, and only include them when they are used. Then instead of having a single nodelibs repo, we download the nodelibs repos we need as we need them.

The reason this isn't currently supported is because dependencies are returned from getPackageConfig, which is before download completion, and download dependencies are ignored.

The addition would be to allow the build function to return further dependencies. This is the simplest fix and most sensible one.

guybedford commented 9 years ago

Completed in https://github.com/jspm/npm/commit/d0b37ffb00a11859b34e42ec38334aa73a7ebd29.

Node core libs are now only downloaded as they are needed.