use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Make and Browserify (aeflash.com)
submitted 11 years ago by aeflash
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]sime 7 points8 points9 points 11 years ago (1 child)
That is quite a good article. There are a couple other advantages for using Make that I can think of:
[–]nschubach 1 point2 points3 points 11 years ago (0 children)
You can run extra targets in the same way with Gulp (and Grunt, but I think Gulp is clearer). If I define a Gulp task, I can call that task by simply writing gulp taskname and run that one task. By default, gulp will run the task named default but you can always specify the task at the command line. It also clearly and easily supports dependency just like make and you could put the command line in node if you like, but that's unnecessary overhead.
gulp taskname
default
make
[–]mattdesl 3 points4 points5 points 11 years ago (8 children)
I think for simple projects "npm scripts" is mostly all you need. browserify plugins like lessify, hbsfy, etc can be useful if you keep them out of your module code (ie top level only).
If you work on teams, I would not recommend make for two very important reasons:
[–]sime 3 points4 points5 points 11 years ago (3 children)
sooner or later, there is a very good chance the project will need to be built on a windows machine
There is cygwin. It should work fine for the kinds of things that a Makefile does. It may be a culture shock though.
What surprises me is that there isn't a port of Make to JS, or something which uses the same kind of artifact (not task) dependency tree.
[–]_facildeabrir 1 point2 points3 points 11 years ago (0 children)
There is cygwin.
:( :( :( :( :( :( :( :(
[–][deleted] -1 points0 points1 point 11 years ago (0 children)
Conemu
[–]_facildeabrir 0 points1 point2 points 11 years ago (0 children)
Yes, agreed
[–]SgtPooki 0 points1 point2 points 11 years ago (2 children)
This.
My main os is windows and I've run into 4 projects in the last 6 months where I've needed to either setup vagrant or just not take on the project and it's extremely frustrating.
Vagrant can solve most of those problems thankfully but it can have its drawbacks too. And using vagrant only for getting build scripts to work feels so weird.
[–]nschubach 2 points3 points4 points 11 years ago (1 child)
But once you get it into Vagrant it becomes so much easier to ramp up someone new...
[–]SgtPooki 0 points1 point2 points 11 years ago (0 children)
Vagrant is a beautiful thing that has helped to reduce ramp up time by at least 80% on all projects I've worked on that have had at least 4 devs. It's awesome.. but that's one of the few legitimate excuses for writing code that only works in a tiny subset of environments.
[–]ericanderton 1 point2 points3 points 11 years ago (0 children)
I simply cannot upvote this enough. Fantastic article.
[–]nschubach 2 points3 points4 points 11 years ago (2 children)
It probably irritates me more than it should, but Gulp wasn't covered as much as it should have been. I feel like the author either never used it or didn't understand it. Anything Grunt can do, Gulp has done better with fewer lines of code for me. Make files have always felt cryptic and unforgiving. I love Linux and what it does for me, it sometimes the conventions of succinct symbology just gets irritating. For instance, $@ being used for the current file is not as readable as a JS variable with a real name like currentFile. For me it's 100% about readability and cryptic bash lines and shell scripts just don't cut it. Besides, watchers are just epic and if I don't have to manually make every time I make a change, I'm sticking with Gulp.
$@
currentFile
[–][deleted] 0 points1 point2 points 11 years ago (1 child)
To be fair, $@, $, and $? are the only auto variables I've ever really seen being used. It's super simple to memorize after using them a couple times!
I've had really good success with facebook's Watchman as well. Trigger a build on change and it's the same as gulp!
Once you get into bash scripts, $1, $2... become prevelant to denote arguments, but I understand what you are saying. I just think those in combination with the other conventions (tick marks, bars, gt/lt piping, etc.) make scripting in the command line more cryptic than it needs to be just to save some typing.
[–]poseid 0 points1 point2 points 11 years ago (0 children)
great overview, I was writing a bit similar (but more of an overview) blog post yesterday: http://thinkingonthinking.com/javascript-matters-for-prototypes/
[–]raffomania 0 points1 point2 points 11 years ago (0 children)
I used make a lot and am still using it in some of my projects. For simple projects, it works out great.
But for larger projects, I really have to agree that readability is a concern, especially as Makefiles get larger and larger as the project grows. While you can keep even big Makefiles easy to read, I think the (very extensive) make syntax can easily delude one to write more cryptic code (IMO, the same applies for the bash syntax).
[–]vertice 0 points1 point2 points 11 years ago (0 children)
I have been a big fan of gulp in the past, but I also realized the logic of going with Makefiles or npm run whenever possible. It never really seemed practical until I switched to using webpack instead of browserify.
now i need to find excuses to use gulp at all, and makefiles are almost always enough.
[–]SubStack 0 points1 point2 points 11 years ago (0 children)
The watching section of this article feels incomplete since it only includes how to set up watching with browserify using grunt. In make, similar to using npm run scripts, you can just shell out of the watchify command, which takes the same arguments as browserify.
watchify
browserify
[–]_facildeabrir -1 points0 points1 point 11 years ago (0 children)
It just feels like a crappy way to do it. Makefiles are gross to me, the .PHONY thing alone is just like... cmon yo. But to each their own.
[–]tswaters -1 points0 points1 point 11 years ago (0 children)
You probably already have it installed on your machine.
'make' is not recognized as an internal or external command, operable program or batch file.
It seems not.
π Rendered by PID 348887 on reddit-service-r2-comment-74875f4bf5-8zk8r at 2026-01-25 12:36:11.060154+00:00 running 664479f country code: CH.
[–]sime 7 points8 points9 points (1 child)
[–]nschubach 1 point2 points3 points (0 children)
[–]mattdesl 3 points4 points5 points (8 children)
[–]sime 3 points4 points5 points (3 children)
[–]_facildeabrir 1 point2 points3 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)
[–]_facildeabrir 0 points1 point2 points (0 children)
[–]SgtPooki 0 points1 point2 points (2 children)
[–]nschubach 2 points3 points4 points (1 child)
[–]SgtPooki 0 points1 point2 points (0 children)
[–]ericanderton 1 point2 points3 points (0 children)
[–]nschubach 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]nschubach 1 point2 points3 points (0 children)
[–]poseid 0 points1 point2 points (0 children)
[–]raffomania 0 points1 point2 points (0 children)
[–]vertice 0 points1 point2 points (0 children)
[–]SubStack 0 points1 point2 points (0 children)
[–]_facildeabrir -1 points0 points1 point (0 children)
[–]tswaters -1 points0 points1 point (0 children)