4 ms·
Please show me the makefile for your Javascript project that will run perfectly on Linux, Windows and Mac with little to no setup. I doubt it exists. Until the
by WayneBro 10y ago
Please show me the makefile for your Javascript project that will run perfectly on Linux, Windows and Mac with little to no setup.
I doubt it exists. Until then, I'll stick with my Node.js build tools, thank you very much.
Honestly, if anyone has an example of a makefile that can bundle my scripts, insert bundle links into my HTML which is compiled from jade and nunjucks templates, minify the JS, CSS and HTML and optimize my images...I'd love to see that.
- spinlock 10y agoI can't even get `npm install` to run perfectly on my mac. It _always_ fails and needs to be re-run a few times to get everything installed. Anyway, the point is, everyone likes the smell of their own farts. But, they still stink.
- ori_b 10y agoI tend not to do much with Javascript, but if you have a project that I can take a shot at converting, I'd be curious to see what trouble you're running into. Windows is the only real challenge there, but with mingw, I can't imagine that it's a serious one.
- Someone 10y ago"Please show me the makefile for your Javascript project that will run perfectly on Linux, Windows and Mac with little to no setup." One can argue that it would be better to solve that problem, rather than requiring everybody to sort-of solve it well enough to run one's own build. Having said that, minimizing .js, .css, .html or .png files conceptually is the same as turning a .c into a .o, and bundling is conceptually the same as tarring or zipping a set of files, so I don't see why it wouldn't be possible to write a makefile that does that.
- nwmcsween 10y agoSure github.com/nwmcsween/asm.css/Makefile
- WayneBro 10y ago"that will run perfectly on Linux, Windows and Mac with little to no setup"? No. I see no reason at all to use a Makefile in that project other than it being your personal preference. It's completely non-standard for web projects and it will only serve to confuse and annoy the next developer who wants to work on your code. Node.js, NPM, Gulp and Grunt are all orders of magnitude easier to get running on a wide variety of operating systems than your typical C/C++ build tools. Furthermore, you don't have to learn some cryptic syntax to use them. It's all Javascript and JSON.
- nwmcsween 10y agoBecause gulp, grunt are not real build systems, they are glorified scripts that do whatever, there is no tracking of dependencies, nothing. Make isn't a cryptic syntax it's a quite simple language that took me about a day to understand fully.
- WayneBro 10y agoIncorrect. Gulp and grunt can track dependencies the same way you do anything else with it...just add the right plugin. Saying that gulp/grunt aren't real build systems because of one feature that you actually missed anyway is like saying that Javascript isn't a real programming language because it doesn't compile to assembly. Practically nobody uses Make for JS outside of a few misguided folks. There are good reasons for that. One of them is that Make's craptic language is useless outside of that one single task. Another one is that Make sucks at cross-platform. It forces you to use OS tools that don't exist on every OS. Meanwhile, Node.js tools work everywhere.