Publish sub-packages to NPM #88
Closed
aleclarson
announced in
RFCs
Replies: 1 comment
-
I'm leaning toward keeping |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Idea: Publish every sub-folder in
src
as its own package.Why? Allows Node.js packages to use Radashi without bringing everything in. We could do more granular packages (each function gets its own package) like Lodash does, but I figured this would be a nice middle ground.
The main benefit of this approach is code deduplication, because the main
radashi
package could depend on these sub-packages without substantially increasing the number of HTTP requests when installing. Therefore, any libraries using a sub-package won't be introducing the risk of duplicated functions if your application uses the same function, but from theradashi
package.radashi.array
exports all functions in./src/array/
radashi.object
exports all functions in./src/object/
Note: The
radashi-org/radashi
repository would remain the same. This only adds an extra bundling step.Hoping for some feedback on this idea before I work on it. ✌️
Beta Was this translation helpful? Give feedback.
All reactions