componentjs/component

package.json fallback if no component.json exist for remote deps

timaschew opened this issue · 0 comments

because of reactions like this: chaijs/sinon-chai#26 (comment)

So my idea is to fetch the data from github, not npm.
Because the files which are used are implicit via require calls from the entry point (main property of the package.json) we need to download the archive and not single files.

Then we need to do the same as browserify and duo are doing: parse the require calls, transitively and collect them and maybe generate a component.json from it, put it to the components directory where alll the remote files exist. Then we need to do the same for each dependency, at this point we need a mapping from the npm repo names to the github url and for each dependency we need to do the same, transitively.

Then we're done, so we don't need to change something for the build process. Because we have all the component.json files. We only need to extend the install process for remotes.