Why no dependencies?
fresheneesz opened this issue · 5 comments
The whole point of a module community is to be able to make modules from other modules, reducing the time it takes you to create your module, and increasing the robustness of all modules by reducing duplication in the community as a whole. This seems like its exactly what microjs.com is advocating - small libraries you can cobble together to create a lean system.
The problem is, disallowing people from using any dependencies means that the majority of microjs's modules will be reinventing some wheel they could otherwise be pulling in another module for. Even if you just use one single dependency, a library is disallowed from being a part of the registry here.
I propose that this requirement be removed. Since the modules have to be sub-5kb, that should be sufficient to keep these modules small and singularly-focused.
You'll notice that some modules in your registry fudge this by copying their dependencies into their repositories as 'libs' or something like that. This is still a dependency, but gets around your rules apparently. Example: https://github.com/somajs/somajs
+1
You've made a good point about how accepted libraries actually have embedded dependencies. However, those bad apples should not be embraced. Instead, they should be removed.
I've never considered microjs as part of the module community. It is not a subset of npm, or other browser-based package managers. When I direct friends here, it's so they can be inspired by the simplicity involved with solving single domain problems. Of the few libraries I've used, I enjoy the control of loading just what I need, and not being told how to glue it all together. Technically, this means I choose what's a dependency, instead of the library author.
Withstanding issues of oversight and curation, microjs is a collection of dependency free libraries that embraces the unique nature of the web-browser. More importantly, it promotes both creativity and ingenuity amongst its contributors. This resource stands alone in a sea of module loading systems available, and I'd like to keep it that way.
Everything has it's place.
Just built a project for reusing javaScript snippets with dependencies. Maybe you'll be interested in it.
Project repo: https://github.com/liriliri/eustia
Module repo: https://github.com/liriliri/eris
I think, because if there are any dependencies, your library is not micro anymore, from your end user point of view.
your-lib.js 3K
`-- your-dependency.js 3K
`-- yet-another-dependency.js 4K
`-- and-yet-another-dependency-dependency.js 2K
TOTAL 12K ...is this micro?