4 ms·
One thing I appreciate about the javascript ecosystem and "scripts" is the focus on keeping everything contained in the project. The only assumption about the s
by kall 5y ago
One thing I appreciate about the javascript ecosystem and "scripts" is the focus on keeping everything contained in the project. The only assumption about the system is that it has node, from there it's npm i, npm start. Scripts are a way to make sure people always run the project-local version of various development tools and not whatever they happen to have installed.
When I see a makefile, I expect they will be making more assumptions about my system and expect a little more work.
I do appreciate the "has worked fine for decades" aspect of makefiles, and I guess docker solves some of this, but I still prefer a fully self contained javascript project.
- des429 5y agoYeah this seems to miss some of the biggest features of npm scripts. Access to the project's local packages is probably the biggest feature not mentioned IMO.
- throwawaycuriou 5y agonpx to the rescue
- yurishimo 5y agoTo add one tiny thing to this, it’s absolutely imperative that your project be setup with safeguards for node version dependencies. I can’t tell you how many projects I’ve joined that don’t even have an nvmrc file, much less some guard to ensure a clean install and build.
- andreineculau 5y agoWhen you say everything contained in the project, you forget that there's more to life than just node/javascript. Just two silly examples: you cannot run/deploy your API backend without docker/kubernetes/aws-cli/etc, nor your mobile app even if it's in JavaScript (react-native). The only way to keep to node/javascript is if you only develop libraries (a website that doesn't get deployed -> still on library level).
- gedy 5y agoAPI backends/middleware can be Node.js too
- kall 5y agoThat's true, kind of. If you have those kinds of tasks, I see the appeal of the makefile over various commands in package.json that won't run after a simple npm install anyway. In practice, you may be building your react native app with EAS Build and deploy your website/api to Vercel or to AWS with pulumi. That's all still npm dependencies.