3 ms·
I'm just wondering why not use npm scripts instead of Makefiles? They work in Windows as well and they're easier to understand (at least imo).
by alessioalex 11y ago
I'm just wondering why not use npm scripts instead of Makefiles? They work in Windows as well and they're easier to understand (at least imo).
- ThePhysicist 11y agoI haven't looked at those yet, sounds interesting though!
- Arnavion 11y agoAs long as they're single commands. Running multiple commands using `&&`, etc. is unfortunately not portable.
- jdmichal 11y agoWhat platform does `&&` not work on? It works fine in Windows `cmd`, which is the typical shell to worry about portability with.
- Arnavion 11y agocmd's `&&` is the equivalent of bash's `;`. bash's `&&` has no equivalent in cmd. Edit: Never mind, I'm apparently wrong.
- jdmichal 11y agoOn Windows 7; note the lack of version information from Java: > rm test.txt && java -version rm: cannot unlink entry "test.txt": The system cannot find the file specified.
- joshuacc 11y agoThat's not correct. I use npm scripts with `&&` on Windows many times per day. Other features may not be portable, but that one definitely is.
- Arnavion 11y agoSee https://news.ycombinator.com/item?id=11061056 https://news.ycombinator.com/item?id=11061056