4 ms·
But...tons of the nontrivial JavaScript projects I use describes a plain <script> inclusion. So I don't quite understand the plaudit here. Doing so is not a gr
by eropple 9y ago
But...tons of the nontrivial JavaScript projects I use describes a plain <script> inclusion. So I don't quite understand the plaudit here.
Doing so is not a great idea, because build tools solve real and extant problems, but they're very common.
- pjmlp 9y agoPity that the end result is always having bower, webpack, npm, yarn, gulp, yeoman installed. Really painful when JavaScript is only used on the browser and the frontend files need to be integrated into the backend infrastructure written in a more sane language.
- endless1234 9y agoWhy would a project have both npm and yarn, or bower, webpack and gulp?
- pjmlp 9y agoEasy, each library is its own little world of dependencies, with the author favoring a different build tool, so simple npm install or npm serve might require all of them to satisfy all the dependencies build scripts.
- newfoundglory 9y agoIs that a real world scenario or something you can imagine but haven't actually done?
- pjmlp 9y agoIf you want a real world scenario, here is one Polymer starter kit https://github.com/Polymer/polymer-starter-kit https://github.com/Polymer/polymer-starter-kit - npm - bower - polymer-cli Doing a polymer test requires downloading and installing Web Component Tester, which then requires: - npm - grunt - gulp - bower https://github.com/Polymer/web-component-tester https://github.com/Polymer/web-component-tester
- Vinnl 9y agoPolymer is indeed ridiculous. But there's a reason it's not used that often. My relatively standard project (using React) needs just Yarn and Webpack. It's got quite some dependencies, but I've never run into those being insufficient.
- mlsarecmg 9y agoI think you're confusing something. You don't "build" dependencies, you consume them as pre-built modules. As a package author you use whatever you want (rollup, webpack, gulp, grunt, ...), but you will most likely publish to npm, because bower is dead. As a consumer you use npm or yarn, it doesn't matter, and a tool that handles modules, probably webpack. Even if you'd use something else (rollup & parcel come to mind), it doesn't matter, they will all treat your dependency the same. EDIT: Yeah i just saw you're referring to Polymer. I take it back, everything you said applies. But then again, people probably want to suffer when they use it. Though very few actually do use it. I just don't think it's a good example to make to describe web dev in general. Rather Google was the only one that missed the train it seems, they worked in the opposite direction.
- JustSomeNobody 9y agoA lot of tools solve real and extant problems, but that doesn't mean they should always be used.