Show HN: JohnnyDepp – A tiny dependency manager for modern browsers in 862 bytes
21–30 of 45 posts
Re: Show HN: JohnnyDepp – A tiny dependency manager for modern browsers in 862 bytes
#22Maybe 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.
"Johnny"
Re: Show HN: JohnnyDepp – A tiny dependency manager for modern browsers in 862 bytes
#23…why would you name this after a domestic abuser?
Re: Show HN: JohnnyDepp – A tiny dependency manager for modern browsers in 862 bytes
#24…why would you name this after a domestic abuser?
Re: Show HN: JohnnyDepp – A tiny dependency manager for modern browsers in 862 bytes
#25How's Johnny really managing his dependencies?
Re: Show HN: JohnnyDepp – A tiny dependency manager for modern browsers in 862 bytes
#26Please 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.
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
#27Maybe 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.
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
#28Please 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.
Re: Show HN: JohnnyDepp – A tiny dependency manager for modern browsers in 862 bytes
#29This is without doubt the worst dependency manager I have ever heard of.
Re: Show HN: JohnnyDepp – A tiny dependency manager for modern browsers in 862 bytes
#30 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/)