6 ms·
Show HN: Jetpack – Webpack made more convenient
- fimdomeio 8y agoHey just fyi in case you don't know, jetpack[1] is the name of a very well known wordpress plugin by Automatic. Might cause some confusion. [1] https://wordpress.org/plugins/jetpack/ https://wordpress.org/plugins/jetpack/
- acemarke 8y agoIt was also a Mozilla addons SDK: https://wiki.mozilla.org/Jetpack https://wiki.mozilla.org/Jetpack
- echeese 8y agoIt's also a set of Android components: https://developer.android.com/jetpack/ https://developer.android.com/jetpack/
- adzm 8y agoIt is also an Nvidia AI SDK: https://developer.nvidia.com/embedded/jetpack https://developer.nvidia.com/embedded/jetpack
- buremba 8y agoIt's also a rocket belt. :P
- yakshaving_jgt 8y agoIt's also a tremendous classic game for the Apple Macintosh https://www.macintoshrepository.org/3885-jetpack https://www.macintoshrepository.org/3885-jetpack
- gibolt 8y agoIt's also how militaries buy airplanes in bulk
- johnhenry 8y agoIt's also a musical duo who specializes in using "surf instruments". https://en.wikipedia.org/wiki/Jetpack_(musician) https://en.wikipedia.org/wiki/Jetpack_(musician)
- jakelazaroff 8y agoLet's just end this here: https://en.wikipedia.org/wiki/Jetpack_(disambiguation) https://en.wikipedia.org/wiki/Jetpack_(disambiguation)
- ryantriangles 8y agoIt's also an equally tremendous and even older classic game for the ZX Spectrum and VIC-20 by the artists later known as Rare https://en.wikipedia.org/wiki/Jetpac https://en.wikipedia.org/wiki/Jetpac
- zeroxfe 8y agoAlso a tool to compress WINS/DHCP databases: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/jetpack https://docs.microsoft.com/en-us/windows-server/administrati...
- Pxtl 8y agoThey should rename it to WebPackJetPack, or WPJetpack for short. That will reduce confusion, right?
- dreamling 8y agoYes, my first thought was this post was WP related. (and then I actually read the link. ;) )
- guessmyname 8y agoSearching for “jetpack” in a fresh —no cookies— browser session returns: • https://jetpack.com/ https://jetpack.com/ • https://twitter.com/jetpack https://twitter.com/jetpack • https://wordpress.org/plugins/jetpack/ https://wordpress.org/plugins/jetpack/ Which are the canonical URLs for JetPack, by Automatic. KidkArolis will have a hard time promoting his project. --- My suggestion for KidkArolis is to rename his project to one fo these: • “ConvePack” considering the slogan “Webpack made more convenient” • “WrapPack” considering the description “Jetpack wraps webpack” • “SimplePack” assuming his project is simpler than WebPack
- franciscop 8y agoI had very similar critic of "server js", but with enough backlinks and a bit of time it seems to be solved. Though it's not exactly the same, in my case it was because of "noise", in this case it'd because of a competing brand. I'd say keep jetpack to see how it turns out, they are vastly different projects.
- Jarwain 8y agoWhat about rocketpack, to fit its current naming theme? Or spiderpack? Netpack? Silkpack?
- ksec 8y agoOR JustPack? I remember one of the main Goal of WebPack 5 was sane defaults. ( I cant find the post anymore ) So hopefully the WebPack team can learn a lot from JetPack.
- kakarot 8y agoIt's also a tool for Android development.
- SquareWheel 8y agoIt certainly confused me. I even read the title as "Jetpack - Wordpress made more convenient" simply because my expectation had been set.
- ronilan 8y agoRun anywhere without installing locally, just like nodemon. I npm install everything locally, never globally, and use npm run script to easily execute (and chain) stuff. Am I in the minority?
- dragonshed 8y agoI can count with one hand the number of things I install globally. Everything else is local.
- kn8 8y agoNah, I think installing locally is more common and often recommended. But I personally like the convenience of executing ad hoc bits of js on my laptop using `node` or `nodemon`. Why not the same for browser javascript? E.g. you could do something like: cd ~/Desktop/foo npm i somepkg echo console.log(require('somepkg')()) > index.js jetpack And now you're running some pkg in the browser, to try/test it out. That's what the use case for this feature really is. For real apps, I install it locally as well or else a breaking change in the future could cause issues.
- e12e 8y agoNo language has this down, but there's an environment manager (pip, rustup, rbenv..) that try to do all, and avoid the need to handle more than one "magic" session in your bashrc(etc): "asdf": https://github.com/asdf-vm/asdf https://github.com/asdf-vm/asdf Now, a few new languages do come with pretty decent "virtual env" thingy-s , but most stumble for a few years. So far (past year) I've been pretty happy with asdf. Mostly use it for ruby and node - but also rust and golang, lisp, Java and ocaml (mostly as a "consumer" of various cli tools, and/or toy projects.
- wellpast 8y agoAnd then weirdly you have also this alternative to webpack from the Elm community: https://github.com/NoRedInk/jetpack https://github.com/NoRedInk/jetpack Also called Jetpack...
- joemanaco 8y agoHaven't looked deeper in it, but why does it happen all the time that people think they can fix complexity by adding another layer of complexity too it?
- codereflection 8y agoPerhaps because David J. Wheeler said "We can solve any problem by introducing an extra level of indirection."
- mpweiher 8y agoExcept too many levels of indirection...
- rpeden 8y agoJust wrap it in an IndirectionManager and instantiate that via an IndirectionManagerFactory and you're good to go. :)
- toyg 8y agoYou forget the IndirectionPolicy interface...
- rpeden 8y agoFunny you mention that. I was considering amending my post to include IndirectionStrategy. But I was worried about opening a Pandora's box of indirection design patterns. I mean, who are we to assume that you want to invoke all this indirection now? Better to wrap it all in an IndirectionCommand so you can invoke it whenever you want. And there's no need to keep too many copies of identical IndirectionCommand instances around, so you'll also want an IndirectionCommandCache class, which will of course need an IndirectionCommandCacheStrategy because you don't want to just assume you know how and for how long people will want to cache those commands.
- 8y ago
- porphyrogene 8y agoThere are a lot of "configuration-free" Webpack solutions popping up. The one thing that they all have in common is optional configuration.
- kn8 8y agoYes, but it's a solid foundation that they all try to offer. Raising the bar for what you get from the tool by default, ideally without making assumptions that would exclude it from any use cases. I'd argue one of the reasons Next.js is so popular is because you can get started with no configuration. It has optional configuration, but all the webpack config, css, hot reloading, route splitting, etc. all serves as a solid foundation.
- kabes 8y agoIf you want something truly configuration-free you could try Meteor. It's mostly an advanced zero-configuration (not even optional) build tool these days that supports automatic code splitting via dynamic imports, full npm integration, multiple bundles (old/new browsers), ... Typescript support could be better, but I believe they're working on that. Of course being zero-config you loose some flexibility.
- d357r0y3r 8y agoThe problem is, it's configuration free until it's not. If you end up having to pass in a partial Webpack config anyway, how much time are you really saying? The reality is, at this point, Webpack has become a powerful tool with a big ecosystem around it. Configuration is not that complicated. It used to be an absolute mess, but these days, the documentation is really good and there are many sensible defaults. It's worth learning without these wrapper solutions.
- Vinnl 8y agoInterestingly, the most common criticism of Create React App is that it doesn't allow configuration. I agree with you, though: it makes sense that they don't allow it. (Although they do have some sensible exceptions, as in: you can "configure" a CSS preprocessor like Sass by installing it.)
- fiatjaf 8y agoDo you know what else works almost without configuration, it's fast and produces small minifiable bundles? Browserify.
- kn8 8y agoYeah, I mention it in the Comparison[1] section of the docs ;) [1] https://github.com/KidkArolis/jetpack/blob/master/docs/08-comparison.md https://github.com/KidkArolis/jetpack/blob/master/docs/08-co...
- general8bitso 8y agoIsn’t that the name of a Wordpress plugin? https://wordpress.org/plugins/jetpack/ https://wordpress.org/plugins/jetpack/
- Chloro 8y agoWe already have parcel.js which does all of this really well.
- BucketSort 8y agoWoof sometimes HN can be pretty unforgiving. Remember the human guys. Good job man. Keep it up. Thanks for contributing to open source.
- nikkwong 8y agoAgreed. Webpack's configuration is so daunting that, well, this is so obviously needed.
- chrisweekly 8y agoNot anymore! Webpack 4 is ~"zero-config"!
- kn8 8y agoFor a different definition of zero though. While webpack now does something useful with no configuration (which is great), you will most likely end up adding lots of configuration for any application. Whereas with jetpack there's a chance that you won't (at least in my experience). The challenge of course is the diversity of the ecosystem. Different projects are trying to address it differently, e.g. * CRA is opinionated and unconfigurable * Neutrino/pwa-cli propose a higher level plugin approach (i.e. install a plugin, without needing to configure it, in webpack plugins take many lines of configuration to configure) * Next/Gatsby use a plugin system as well but are also specialised tools which means a lot of decisions can be abstracted * jetpack tries to be application/use case/framework agnostic and provide you with the most commonly used/useful foundation, you can optionally add extra (e.g. sass), but you don't have to recreate the foundation (i.e. es6, jsx, modern css, css modules, hot reloading, serving, producing html, etc) It's also about the DX, jetpack lets you run a dev server with a single command, it lets you analyse the bundle with a sigle command, it builds an optimised, split chunk bundle with a single command. Just pointing out some motivations behind the project, I'm a fan of webpack, been using it for many years.
- cfv 8y agoHow does this fare against parcel-bundler (https://parceljs.org/ https://parceljs.org/)? It does pretty much the same thing in a slightly different manner, and I'd like to know before I actually consider giving it a try. Thanks! [1]:
- root_axis 8y agoCool. I wouldn't take the critics too harshly. As someone who has configured a lot of webpack configs across multiple version of webpack and various versions of the plugins necessary to enable these features, I know exactly what you had in mind when you put this together. This is a very saturated technology stack, so people can't help but react to it as noise. To the critics, in front-end land there are some programmers who believe that building an SPA is always a mistake. I am of the opinion that there are some types of applications that live in the browser that benefit from the UX enhancements that scripting can provide. We all know some examples. Everyone knows that front-end land is a crazy wild-west with a lot of moving and a lot of breaking along with a lot of hype, trends, wheel-reinventing and cavalier attitudes towards security. The criticisms are mostly fair. However, if you're building an SPA, there is a combination of tools out there that can provide a very conceptually clean (from an architectural perspective), performant, reusable, and highly productive and fun development experience. Of course, this doesn't mean these tools make building an SPA the appropriate engineering decision, they are just tools, only the requirements can dictate whether or not an SPA should be built. This project attempts to preconfigure via webpack, what is IMO, the best selection of tools available for working on an SPA today. For me, these tools include: - react - react SSR - bundle code-splitting - es6 (or ts/es6+flow) - es6 modules - hot code and css reloading - module aliasing - css modules - postcss - reusing business and validation logic modules on the front and back end All of these tools solve very specific (former) problems that one encounters while working on an SPA. Anyway, nice work!
- jczhang 8y agoWhat was the motivation for this given existence of CRA? What are the main differences?
- kn8 8y agoI'd say: - meant to be not React only - less opinionated in that it doesn't include jest - smaller in scope/code, so easier to understand what it does by reading the code (?) - allows extending configuration - focus on SPA use case with jetpack/serve or proxy features I should probably give CRA a proper spin though, it's popular and V2 seems pretty good.