Using Neutrino to jump-start modern JavaScript development
hacks.mozilla.org
hacks.mozilla.org
This looks neat, I just don't think it's likely to do away with configuration completely unless you've got a very standard setup.
That aside, it sort of sounds like the goal here is "a sort of package manager which also handles boilerplate"? Definitely sounds useful when you want to quickly try something new.
Webpack is great for what it is, but I strongly disagree that people should have to understand the config boilerplate aspect to get something functioning. All it does is prevent you from doing real work, not to mention if you're working on dozens of apps, this quickly becomes a hellish thing to deal with.
Is css-in-js is more ridiculous than regular CSS? I've left regular CSS behind and gained a lot of sanity.
I don't want to discourage people trying new things, but I also don't want people to waste thousands of collective hours dealing with crazy configuration.
I think toying around with those things are fun for people who get paid by startups etc, but for those of us who simply want to get things done, the ecosystem is not enjoyable.
If you're simply concatenating files together, Webpack is decidedly the wrong tool. The magic that Webpack does is understand what you're require()ing and automagically just make a bundle for you. Point it at your project root, and you get a bundle.
Neither did I until one day I tried to do something slightly outside those tutorials and the whole thing kind of stopped working for reasons I could never fully understand.
That being said I'm still using webpack, but it's not really an enjoyable experience.
> echo '<h1>Hello world</h1>' > hello-world.htmlHow long does it take you to download XCode and tools and get a "Hello World" iOS app running? It'd take me much longer than 1.5 minutes.
Here is an example of usage https://github.com/NotionTheory/Primrose/blob/master/gulpfil...
The name is lame, I hadn't considered sharing it and I misremembered that the dev server and doc gen are not yet a default part of the build project (though I could add them easily).
Is this out of the scope for the basic example or an oversight? Anyway, if this is targeted at beginners, that's a bit of an issue.
[1] https://webpack.js.org/configuration/output/#output-filename
[2] https://github.com/facebookincubator/create-react-app/blob/m...
https://github.com/facebookincubator/create-react-app/blob/m...
You can use an environment variable to point to a CDN host and use it as a prefix in your code. But you also need to make sure the CDN assets get expired. One approach is to use the stats plugin for Webpack, parse the manifest, and write a helper so that the right files get included in the HTML.
Here is an example of how the webpack-rails gem does it: https://github.com/mipearson/webpack-rails/blob/master/lib/w...
And here is an explanation of why you would want to do that instead of using ETag headers on constant filenames: http://stackoverflow.com/questions/26272271/why-digest-are-u...
EDIT:
In fact after looking into it, Neutrino does use html-webpack-plugin which does exactly that by templating index.html: https://www.npmjs.com/package/html-webpack-template Which is cool!
create-react-app is a great example of a project that abstracts away all the complexities of a JavaScript build process and dev environment, but customization inevitably requires you to 'eject' and reintroduce that complexity to your project.
This tool goes one step further and supports customization without this eject step.
This is finally where web builds need to be to provide a simple foundation for modern web development so devs can focus more on making apps and less on tooling.
I look forward to trying it out.
Building Javascript files with modules and deps is a solved problem. We've built all sorts of other file types and compiled them and linked them before with tools like Make, SCons and other tools. It's ridiculous to think that JavaScript is a unique language that needs its own build tools. It does not.
We went down the wrong path years ago when we decided that whenever we use a language we also need to use tools written in that language. Grunt, gulp, webpack and the rest should go away.
We'll call it Hadron, since Hadron decay can result in the production of Neutrinos...
When you understand this, React's shadow DOM and JSX are completely unnecessary.
Combine it with the fact that grid layout is expected to be in the stable releases of Chrome and Firefox in the next month, and, if you have no legacy browser requirements as I happen not to, web application development becomes somewhat reasonable for the first time since I began doing it in the '90's.
Admittedly, when I started trying to build a library out of this (https://github.com/madhadron/allorryll), I put it in TypeScript, but I'm also the guy who did serial port and Firewire camera control in Haskell.
Obviously this doesn't apply to writing documents on the web, where JavaScript should only be added as part of a structure that will gracefully degrade.
I agree that web development has never been more fun that it is today, except for Safari with buggy flex implementation and iOS that set position: fixed to absolute and refuse to properly scale the "document" when you want to type some text. Every time I get a bug report these days it is Safari or iOS that doesnt follow the standard. Chrome, Firefox, Edge works great most of the time.
ES2016 is "plain JS".
If by "plain JS" you mean "jQuery plus ES5", I encourage you to learn what's happened in the last half a decade.
The irony with all these frameworks, in many cases especially for small projetcs, it will be more efficient to code it from scratch than dealing with the whole stack thing. So much for not reinventing the wheel ...
That name though, I guess particles are en vogue :)
Also, Moz is a completely different, unrelated company.