TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

32 点作者 andres超过 6 年前

11 条评论

o_____________o超过 6 年前
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 未加载
andres超过 6 年前
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 未加载
MaxGabriel超过 6 年前
This is without doubt the worst dependency manager I have ever heard of.
评论 #18131874 未加载
评论 #18138022 未加载
评论 #18134857 未加载
LinuxBender超过 6 年前
Is he cool with using his name and likeness?
评论 #18131412 未加载
sehugg超过 6 年前
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>)
shanghaiaway超过 6 年前
How&#x27;s Johnny really managing his dependencies?
评论 #18134038 未加载
Boulth超过 6 年前
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>
spankalee超过 6 年前
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 未加载
mjg59超过 6 年前
…why would you name this after a domestic abuser?
评论 #18133879 未加载
评论 #18133431 未加载
评论 #18136692 未加载
jaequery超过 6 年前
nice name!
sdx23超过 6 年前
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 未加载