fpm
fpm copied to clipboard
allow npm dependencies to be decoupled from the target package
Hope this helps for #880, I have found it quite useful in reducing package sizes and decoupling the dependencies. I was also looking at implementing a solution that allowed the dependency packages to be built as additional, but separate, packages. This would require some additional changes that I hope to address in another pull request. fpm is awesome by the way! :+1:
Hmm.. I wonder if we could turn all of these new flags into a single flag.
When reading your proposal, it feels like we can summarize this behavior into two paths:
- Should the node_modules dependency be internal? (ie: there's a node_modules directory in the package)
- or, Should the dependencies be external? (meaning: the package lists them as dependencies like the
--dependsflag does)
Maybe the flag could be --external-dependencies, defaulting false, and when true will exhibit the new behavior you're adding (that we list dependencies in package metadata instead of including them in the package as files)
Thoughts?
Hi! Yes I agree with your proposal, that sounds good to me. When I get a chance I will update my branch as appropriate.
In the end, for my specific use case, I didn't use this new functionality as "external-dependencies" sent me deep into dependency hell. I do still wonder if things like npm shrinkwrap could have helped - perhaps this is something to consider for this implementation? (sorry, I don't think I'm experienced enough to know best practices with npm/node in production)
On 18 Feb 2017, at 6:47 am, Jordan Sissel [email protected] wrote:
Hmm.. I wonder if we could turn all of these new flags into a single flag.
When reading your proposal, it feels like we can summarize this behavior into two paths:
Should the node_modules dependency be internal? (ie: there's a node_modules directory in the package) or, Should the dependencies be external? (meaning: the package lists them as dependencies like the --depends flag does) Maybe the flag could be --external-dependencies, defaulting false, and when true will exhibit the new behavior you're adding (that we list dependencies in package metadata instead of including them in the package as files)
Thoughts?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.