DEV Community

Cover image for Setup macOS for Development

Setup macOS for Development

Camilo Martinez on September 26, 2018

I’m relatively new on macOS and one of the biggest problems switching from Windows was set up all those SDK and libraries required for web/mobile d...
Collapse
 
_mikhailbot profile image
Mikhail 🐺

I didn't read everything but a quick note about your Node and Yarn setup! I would strongly recommend using nvm for managing Node versions and not installing Node through Brew. It allows you fine grained control over what Node you want to use, don't have to just use one version on your whole system!

Once you've got that, you'll also want to install Yarn without Node so that it's independent of the version of Node which is handled by nvm.

brew install yarn --without-node
Enter fullscreen mode Exit fullscreen mode

I've found it's a far more pleasant experience working this way, being able to easily change versions as needed!

Collapse
 
equiman profile image
Camilo Martinez • Edited

Now I moved to NVM :D

Collapse
 
equiman profile image
Camilo Martinez

Excellent, I have no idea about nvm. I'n my case I'm only need LTS version but it's cool to other know that. Thanks!

Collapse
 
jenc profile image
Jen Chan

Hello Camilo, what a coincidence that I read some of this article yesterday! I just got a new Macbook and looked through around 10 articles to make sure I set up my $PATH and nvm correctly. I'm confused why tutorials advise having .ssh and .bashrc under $HOME whilst stuff that's installed through brew actually goes into MacintoshHD/usr/local/....?

Collapse
 
equiman profile image
Camilo Martinez

Really, I have no idea. I never seen something about it before.

Do you have some of this links? I can take a look and try to understand.

Collapse
 
jeblackburn profile image
Jon Blackburn

You might consider giving this repo a look:

github.com/Pivotal/workstation-setup

With a couple of tweaks (you can fork the repo to your own GitHub and make them there) you can cover most everything a modern developer might encounter.

Disclaimer: I work at Pivotal and use this setup project to pave our workstations on a regular basis between client engagements.

Collapse
 
equiman profile image
Camilo Martinez

Looks nice. I'm thinking do it similar with a console in .Net Core

Collapse
 
ciromattia profile image
Ciro Mattia Gonano

This leaves out all the web developers, luckily there's this walkthrough --> medium.com/the-way-of-the-dev/http...

DISCLAIMER: the walkthrough is written by me -_^

Collapse
 
bxe5056 profile image
Benjamin Eppinger

Fyi: apparently Spectacle isn't actively being developed anymore.
They've recommended users switch to Rectangle instead.
(Haven't tried it personally though)

brew cask install rectangle

Collapse
 
equiman profile image
Camilo Martinez • Edited

Today I moved to rectangleapp and it's awesome: have keyboard shortcuts (like spectacle) but also magnetic windows like winOS.

Post updated with Rectangle information.

Thanks for the advice @bxe5056 !

Collapse
 
equiman profile image
Camilo Martinez

Thanks! I'll take a look next week.

github.com/rxhanson/Rectangle

Collapse
 
moopet profile image
Ben Sinclair

I don't think you really need to do all this. Macs aren't far off being usable machines in the first place.
I'd do homebrew and a better terminal and (if my development stack was that way) install docker and/or vagrant. The rest of it's all very specific to a particular development stack.

On a more serious note, I would not do this:

sudo chown -R $(whoami) /usr/local/lib

simply because there's no reason to and you're messing things up for anyone else who wants to use the same system. I know, I know, Macs are usually one-person machines, but they run unix and are theoretically multi-user. Why try to break it?

Collapse
 
equiman profile image
Camilo Martinez

Yes this kind of thing are very opinionated. I work with non particular Stack: c#, .Net Core, Web and Mobile. Hope can be used as guide. You give me a good idea, organizing it as stacks.

About /usr/local/bin you are completely right I'll add a Warning about. Just use in case you machine is used by only one user.

Thanks!

Collapse
 
5422m4n profile image
Sven Kanoldt

Very Nice overview. But let's not forget dart cli and eco system:

 brew tap dart-lang/dart
 brew install dart

dart.dev/get-dart

Collapse
 
dbelyaeff profile image
Dmitriy Belyaev

Great! Almost everything looks familiar, but have learned something new.

Found typo: Filezilla gist repeats below Keka (File Compression).

Collapse
 
equiman profile image
Camilo Martinez

Thanks! Fixed.

Collapse
 
equiman profile image
Camilo Martinez • Edited

I never heard about meta key. I'll search about it.

Collapse
 
tusharborole profile image
Tushar Borole

Using docker for development will be good instead of installing all this stuff

Collapse
 
equiman profile image
Camilo Martinez

Yeeess, that say me a partner. Maybe you know a link that to the same with Docker? I want to learn.

 
equiman profile image
Camilo Martinez

Those quick access sound nice... great tip.
Sometimes fix something in terminal is slowly, moving only with arrow keys.

Thanks!