Hacker News new | past | comments | ask | show | jobs | submit login

> You use Grunt!? Everyone uses Gulp!? Wait no, use native NPM scripts!

Although couched as a criticism this is actually the community fixing itself. The evolution from Grunt > Gulp > npm scripts is movement away from needless complexity towards simplicity. Npm scripts are effectively just Bash commands that build and manage your project, which sometimes employ small, unixy tools written in Node.

This self correction was pretty quick, it happened within a few years.

> Unfortunately, there isn’t any one “standard” (like everything else in Javascript) for implementing or using Promises.

Yes there is. It's called the Promises/A+ spec, and its built into ES6.




NPM scripts are just a different problem. See:

https://twitter.com/sindresorhus/status/724259780676575232?l...

https://github.com/ReactiveX/rxjs/blob/a3ec89605a24a6f54e577...

Already people are coming up with new "solutions" to this problem that looks more like Grunt. It's a repetitive circle. Personally I just use Make.


So somebody found a project somewhere on the internet with an exceptionally complicated build process, and you use it to say npm scripts are broken? Sorry, that's absurd. Looking at that particular build process, I don't think a Makefile could have been crafted to make it much simpler or smaller. In that example, the problem lies with the complexity of what they're having to do, not the tool.

Npm scripts are really just shell scripting, which means all the real progress happens in the unixy Node tools that do the heavy lifting, where it should be. It's a future proof and scalable approach for the vast majority of projects imo.


It's an inflated example of what all npm script projects become, imo. First you just have "test", then you add "build", then you separate your "test" into one for the browser, one for Node, one for CI, then you need scripts that combine those together; then you create different "start" versions depending on environment... It blows up quickly.

> Npm scripts are really just shell scripting, which means all the real progress happens in the unixy Node tools that do the heavy lifting, where it should be.

That's fine, but you're missing critical features that Make provides; make won't even rebuild a target if no files have changed.


Admittedly, my first 2 or 3 npm scripts based build processes did start to get a bit ugly. But I'm much better at writing them now, so they stay pretty sane.

> That's fine, but you're missing critical features that Make provides; make won't even rebuild a target if no files have changed.

WebPack does this for me too. Also my ava tests don't rerun for files that haven't changed while watching.

Genuinely curious, what scenarios precisely do you find this feature of Make useful?

Also, Make isn't truly cross platform ... and since I sometimes work with Windows devs this would be a problem.


I completely disagree that this is what all npm scripts become

>then you separate your "test" into one for the browser, one for Node, one for CI,

For the love of God why. Don't turn every language into Java.

Plenty of tools will not rebuilt a project if no files have changed, but the dumb, quick and easy way that requires no deendendencies is simply to delete and rebuild.

The fact that this functionality is served so well by a simple dependency shows that you don't need overly complex monolithic tools to accomplish small tasks.


I completely disagree that this is what all npm scripts become

>then you separate your "test" into one for the browser, one for Node, one for CI,

For the love of God why. Don't turn every language into Java


That actually looks better than most Gruntfiles I've seen.


And someone needs to pay for the overhead of 'community fixing itself'.

And the Promise/A+ spec is so bare-bones, it is laughable. And the actual issue is that not every module is embracing it yet.

Sure, it will all be fixed. For freeeee :)


Whether the Promise/A+ spec is bare bones or not doesn't matter, the reference implementation is the ES6 native Promise, which is part of Node and now natively in browsers too. This is concretely what a promise _is_, use a different sort of promise at your peril.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: