-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Makefile with cross-platform scripts #59
Comments
While I agree with the idea, this may be more controversial than it might appear. JustUseMake is the brainchild of core contributor @davidchambers. I would certainly suggest that if we went this way that we didn't try to use Grunt, Gulp, Broccoli, or whatever the flavor of the month is, but instead build with NPM scripts. It seems to have become eminently reasonable to do this these days, and if anything is missing, we can write our own scripts for it to run in Node. I will try to look at your list later in the day (meeting about to start), but at first glance it looks pretty complete. |
👍 |
No offence intended! 😅 👍 the use of npm scripts over a big build tool, especially since most of the tasks seem to just be simple commands anyway. |
Any further thoughts on this? One option could be adding the npm scripts alongside the Makefile for a while to see if they work out. |
👍 — I'd say a Gulp script is much better than Make. Grunt/Gulp > Make Grunt/Gulp > npm scripts Lastly, Make and Gulp are actually both a bit declarative, and most people are familiar with the syntax. Rolling your own npm script often means losing this, or are you planning on building the build script with Ramda itself? ;) Gulp > Grunt Gulp > Broccoli The question is, are the core contributors open to a PR replacing Make with Gulp? |
Interestingly, I have been going in the other direction during my JS career to date.
And I am not alone in this thinking either - Why I left Grunt and Gulp for NPM Scripts. Been refreshing to get rid of all the grunt / gulp verbosity and dependency overhead. And, I do say that after consideration to gulp which has been of great help on quite a few projects to date. In fact, have recently been considering Make as the next step... (for projects where lots of tasks make NPM scripts cluttered anyhow). Likewise, I have shifted from:
Sure this is sucking eggs or else others have their own preferences and workflows that work best for them. Think it is much to do with what you are familiar with, and some subjectivity too.
Sounds correct, but is the Makefile really that difficult to understand (if you are already familiar with task / build tools in general) ? |
With regards to Windows, did find this SOF answer - it certainly doesn't sound ideal but might be a workaround? |
Ok, yep there is Platform specific instructions inside the make file |
@MattMS - are you on Windows OS? Was wondering whether (potentially with some tweaks to the makefile) you could get it running with Cygwin and Nmake. Was hoping to check myself but my VirtualBox instance of Windows trial period has expired. Either way, it appears there is a valid case to be made for cross-platform support, even if that only means providing a bat file / NMake compatible script. |
Sure, but writing an article about something doesn't make it true :) I disagree wholeheartedly with that article. I think the real problem that the article should address, is overuse and reliance on (bad) gulp plugins. But that is not a problem with Gulp, that a problem with how it's used. People tend to "know gulp", instead of really knowing how an OS or Node.js works. That's why there's an overuse of gulp plugins. That's why there's a movement that prefers npm scripts. Take a look at vinyl-transform for example, if used well you'd need almost no The fact that you're using Gulp doesn't mean you can't use npm plugins that don't have a When using npm scripts, for anything more complex than doing Gulp is a standard for JavaScript users. Make is also a standard, but not for JavaScript users. Writing your own nodejs script and then putting it in your |
@branneman - I hear you, and you do make a lot of sense - much of this depends on context, and picking the right tool for the job, plus your own competency level and experience with what you like to use. My own usage of NPM Scripts tends to be succinct statements placed inside package.json, and where possible using NPM packages like rimraf to omit cross-platform incompatibilities. In general, I write packages (both personal and commercially) that target *nix systems exclusively. Given this is an open source project, with mixed audience in terms of knowledge, technical skills and backgrounds but a common JS theme - Gulp might well be the best option. Also, when I inspected the makefile, though I find it quite easy to read, I would have some reservations converting it directly to NPM scripts the way I have done so to date. But again, that might be my own ignorance speaking as I only made the transition fairly recently. Yes, when I think of make I do tend to consider C environments and compiler commands for files. The fact that the makefile has so many .PHONY statements suggests it is sort of being used perhaps a little out of context? |
I'm fine with a Makefile, but I run kubuntu. I did not think windows support would be an issue; I really assumed only ramda core people would be interested in working on the docs site. That assumption is evidently unfounded. That said, put me down as another vote for vanilla node scripts. I did a fair amount of work disentangling this stuff from grunt, I really do not want to go back in that direction. |
Of course saying it does not make it so, but it is not just one article. There's a whole chorus of them. The first one I saw was Keith Cirkel's Why We Should Stop Using Grunt. And I really like this point from it:
It got me to try this, and for a number of small projects, it's been perfect. But I haven't had any large projects to try it on, so I don't know how it will scale. I do know that Grunt/Gulp files are getting as bad as the old Ant files I used to maintain, though, and that bothers me. The only thing that scares me about the NPM scripts is how easy it would be to go the Make direction and create scripts that won't work cross-platform. I no longer can easily test in Windows, but I still would really like for Ramda to build in Windows. If we can be fairly certain that we would have that, then I'd be all for retiring Make in favor of NPM. If we cannot, then I would reluctantly support Gulp. |
While those three have the longest history, just for the record, the current core team consists of |
@CrossEye - your experiences closely match my own.
That is interesting. Again, I have similar sentiments too. And Webpack is starting to remind me of Maven too... aghh.. Re. above - Sorry, perhaps I should not be posting here as not member of core team? |
@arcseldon please keep posting. your contributions are welcome |
This is just plain wrong with the existence of tools like vinyl-transform. I have a lot of Gulp tasks where I'm not using a There's too much misinformation on this subject, and those articles are not helping. Bloat is not the fault of Grunt/Gulp, you're using them wrong if this is your problem.
Windows support does not come or go with the tool, but how you use it. They all support it, if used correctly. Don't get me wrong, I like npm scripts as well, they have their use case for smaller tasks and build jobs. But don't be fooled, it's just as easy to create an unmaintainable (or single platform) mess as it is with Make or Gulp. |
I am actually concerned that it's easier to create a single platform mess with NPM scripts than I would with Gulp. But by experience with Grunt and Gulp, and with Ant before them, always ended in bloat. I haven't yet had that experience with NPM scripts. Perhaps I simply haven't been doing it long enough. 😄 |
No, @branneman asked for comments from the core team, but specifically callled out only three members. I was simply pointing out that the core team is larger than that. |
So my answer is, I'd be more interested in one using NPM scripts. But I would still prefer Gulp over Make for the cross-platform support. I would expect that to raise many more objections, though. |
Sorry :( Where can I find a definite list of which contributors are 'core'? I simply did not know. |
Me too, as noted above. @branneman I appreciate your gallant fight for a node build tool against dogged (if passive) resistance. But for me, you have not yet made a persuasive case for Gulp (Grunt is out of the question for me) over plain vanilla scripts. The disadvantage of adding a build tool is another dependency. That might be ok, if the benefits of that extra layer were manifest. As far as I can tell, your only arguments against roll-yer-own are:
|
|
@CrossEye - thanks for clarification. Appreciate it. Re.
Laughing out loud. Yep, you're another one that got the T-Shirt. Personal opinion only, I could be persuaded with a Gulp file, but as you point out, really we are talking about a small script and any solution so long as cross-platform might be good enough to get started. |
@arcseldon yes, I'm remembering the pain of extracting ramda from the clutches of grunt. we replaced that with a home-grown build script and have never looked back. That experience is certainly informing my opinion here. |
I have my preferences, but the most important thing is for the people most excited about contributing to this project to be happy with the accompanying tools. My vision is of something dramatically simpler. I'm working on a website for Sanctuary which is built by running one script – no need for any of the tools discussed in this thread. Once it is ready, I hope it will inspire us to simplify this project in similar ways. |
Oh, it wasn't a big deal. I just wanted to give credit to others, especially to @asaf-romano, who joined the core team just this week. |
I really look forward to seeing that! |
Quite a surprise seeing how much discussion my little prompt spawned. 😄 I'm on Windows and I'm keen to help with the site, so I'm happy to act as the canary in the Windows mine. I was planning to use npm scripts for the single commands (Gitbook, JSDoc, Less) but the download and build pages would likely require a simple script. I just wanted to check people were happy with me going ahead and get confirmation that task list was complete. |
We all like to talk. A lot.
SGTM |
And to me. |
Cool. Less is easy but I'm a bit stuck with the GitBook and JSDoc commands.
I thought it would be simplest to split the commands into 2 steps. |
Late to the party here. I will always recommend npm scripts as the build tool but have no strong opinion on what ramda uses. |
Have a look at sanctuary-js/sanctuary-site#2. :) Note that I do use Make because I appreciate a dependency graph, but one can run |
It would be nice to replace the Makefile with something that works on Windows and others.
I'm happy to do the work, but I just need to confirm what functionality is needed.
From what I can pick out:
/index.html
, with redirect to latest version of docs.Please let me know anything I'm missing?
The text was updated successfully, but these errors were encountered: