TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: JohnnyDepp – A tiny dependency manager for modern browsers in 862 bytes

32 pointsby andresover 6 years ago

11 comments

o_____________oover 6 years ago
Maybe you should name this JohnnyDep so it's more an allusion and less the actual person's name? Dep makes more sense anyways, as dependency has one p.
评论 #18134587 未加载
评论 #18133391 未加载
andresover 6 years ago
Hi Everyone - author here. I just wanted to give you some background on the project. JohnnyDepp came out of a feature request I got on another project called LoadJS (<a href="https:&#x2F;&#x2F;github.com&#x2F;muicss&#x2F;loadjs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;muicss&#x2F;loadjs</a>) which is an async loading library. The request was for a higher-level dependency manager that:<p><pre><code> 1. lazy-loads files 2. handles JS&#x2F;CSS&#x2F;images 3. handles nested dependencies 4. makes it easy to manage dependencies among team members 5. is extremely lightweight </code></pre> I realize that many teams use RequireJS to manage dependencies but I saw an opportunity to make a library that could accomplish many of the same things but with a much smaller footprint and a simpler API. I hope you&#x27;ll give it a try and let me know what you think!
评论 #18119438 未加载
评论 #18131366 未加载
MaxGabrielover 6 years ago
This is without doubt the worst dependency manager I have ever heard of.
评论 #18131874 未加载
评论 #18138022 未加载
评论 #18134857 未加载
LinuxBenderover 6 years ago
Is he cool with using his name and likeness?
评论 #18131412 未加载
sehuggover 6 years ago
Nothing beats my dependency manager, which I&#x27;ll just call DrGonzo:<p><pre><code> var exports = {}; function require(modname) { if (modname == &#x27;jquery&#x27;) return $; else if (modname.startsWith(&#x27;.&#x27;)) return exports; else { console.log(&quot;Unknown require()&quot;, modname); return exports; } } </code></pre> (Of course you&#x27;ve gotta &lt;include&gt; the modules ahead of time -- I actually use this for <a href="http:&#x2F;&#x2F;8bitworkshop.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;8bitworkshop.com&#x2F;</a>)
shanghaiawayover 6 years ago
How&#x27;s Johnny really managing his dependencies?
评论 #18134038 未加载
Boulthover 6 years ago
Cool, reminds me of this [0], it&#x27;s 850 chars before gzipping.<p>[0]: <a href="https:&#x2F;&#x2F;curiosity-driven.org&#x2F;minimal-loader" rel="nofollow">https:&#x2F;&#x2F;curiosity-driven.org&#x2F;minimal-loader</a>
spankaleeover 6 years ago
Please no. Write standard modules. Serve standard modules to modern browsers, optionally bundling to modules for production. Bundle to non-modules for legacy browsers.<p>Then we can all eventually move forward from this mess of non-standard module formats and loaders.
评论 #18134693 未加载
评论 #18134423 未加载
评论 #18132440 未加载
mjg59over 6 years ago
…why would you name this after a domestic abuser?
评论 #18133879 未加载
评论 #18133431 未加载
评论 #18136692 未加载
jaequeryover 6 years ago
nice name!
sdx23over 6 years ago
I really don&#x27;t understand modern web development. If people would build websites without shit, they wouldn&#x27;t need stuff like this.
评论 #18136842 未加载
评论 #18132076 未加载