Live data from Hacker News

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

github.com

21–30 of 45 posts

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

#22

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.

Extending the subtlety vector a little more:

"Johnny"

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

#26

Please no. Write standard modules. Serve standard modules to modern browsers, optionally bundling to modules for production. Bundle to non-modules for legacy browsers. Then we can all eventually move forward from this mess of non-standard module formats and loaders.

One thing that really sours me in esm is that this is possible (fictional main.js):

    import Vue from 'vue'
    import jQuery from 'jquery'
    global.jQuery = jQuery // to get the next line to 
    work
    import Bootstrap from 'bootstrap'
    import 'bootstrap/dist/css/bootstrap.css'
Then my head explodes. Why would importing a .css file from my JavaScript ever be a thing supported by any tooling. What is that line trying to communicate? What does it even mean to my current scope? (hint: nothing)

import became a giant "do something cool on this line" that maybe the tooling you're using knows how to translate via (say) a webpack loader.

For anyone wondering, that line gets translated to the browser dynamically including css on the page.

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

#27

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.

Or perhaps `JonnyDep` or `JonnyDeps`. A whimsical allusion to someone else can be playful and respectful.

But to appropriate someone else's full exact name for another purpose is kind of rude – especially if that person makes their living from their public image/name.

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

#28

Please no. Write standard modules. Serve standard modules to modern browsers, optionally bundling to modules for production. Bundle to non-modules for legacy browsers. Then we can all eventually move forward from this mess of non-standard module formats and loaders.

It's fine to raise a concern or ask a question about it, but please don't be snarky about it. That's against the rules, both for Show HNs and for the site as a whole.

https://news.ycombinator.com/showhn.html

https://news.ycombinator.com/newsguidelines.html

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

#30
Nothing beats my dependency manager, which I'll just call DrGonzo:

  var exports = {};
  function require(modname) {
    if (modname == 'jquery') return $;
    else if (modname.startsWith('.')) return exports;
    else { console.log("Unknown require()", modname); return exports; }
  }
(Of course you've gotta the modules ahead of time -- I actually use this for http://8bitworkshop.com/)
Post reply on HN