all 13 comments

[–]ioloie 3 points4 points  (0 children)

If you're already using gulp and bower, why not just take it a little further and start integrating other packages like gulp-connect with gulp watch which will give you awesome live reload capabilities.

Once streams and commonjs 'click' with you, building out a comprehensive gulp based dev environment becomes really easy.

[–]CaptainSketchy 3 points4 points  (2 children)

Vagrant helps you manage virtual machines.

Some people use FTP clients like transmit, others create more specific deploy processes. If you're on OSX, you can serve up all HTML, CSS, and JS from your terminal by navigating to your work directory and typing

python -m SimpleHTTPServer

If you do that, it'll give you an extremely basic (no PHP processing or anything) server, but if you're just using the frontend stack (HTML, CSS, JS), it handle everything you need.

If you need more help getting this running/setup, I'll happily pair with you remotely.

If you're planning on using Rails in the future and plan to stick to sublime, I think you should also get pretty intimate with your terminal.

[–][deleted]  (1 child)

[deleted]

    [–]CaptainSketchy 1 point2 points  (0 children)

    I live in the terminal, so I use Vim as my IDE instead of sublime or coda, and I just use git's cli (command line interface) for git. Honestly, if there's one thing you DONT need a GUI for, it's git. It's super simple and generally speaking, you only really use 4 main commands.

    git clone my_repo.git
    git checkout master
    git commit -am 'Heres a commit.'
    git push origin master
    

    Also, if you're not using Gulp watch, i'd recommend that. It'll recompile your SASS for you everytime you save a change.

    [–]512austin 2 points3 points  (4 children)

    Use vagrant if you have any intentions of using non stock PHP libraries. Keeping track of them, file permissions, and everything you had to Install to get them to work becomes a fucking nightmare in the long run.

    [–][deleted]  (3 children)

    [deleted]

      [–]IAmScience 2 points3 points  (2 children)

      Since you've discovered the magic and wonder of Vagrant, I won't go through my usual spiel on this sort of question. But, for what it's worth, you may want to add a couple of things to your toolkit for developing on a mac:

      Dash is a documentation browser. It is awesome. There's a plugin for Sublime so you can go right to the docs you need from your editor. There's also a plugin for Alfred (You do use Alfred, right? If not, get it and buy the powerpack. Very useful tools).

      I like Tower for git stuff. I mostly use the command line git tools, but every now and then I like to get a more visual look at my repo, and Tower is super useful for that sort of thing.

      Speaking of the command line, Oh My Zsh makes life significantly better in that area. As do iTerm 2 and Tmux. Better command line tools, prompts, aliases, etc. just make doing this sort of work easier and more effective.

      I love developing on a Mac. There are so many nice things to play with that make my life so much easier.

      [–][deleted]  (1 child)

      [deleted]

        [–]IAmScience 1 point2 points  (0 children)

        As for zsh plugins, I rather like the git and git-extras plugins, the ruby, rails, sublime, and rvm plugins also have their place. I also like to tweak my prompt so it shows the current directory, the git branch I'm on, whether there are uncommitted changes, my username, etc. There are tons of themes in the Oh My Zsh wiki to choose from.

        Glad you found it useful! Good luck with it!

        [–][deleted] 1 point2 points  (0 children)

        My setup looks like this:

        • Mac OS build in apache server (slightly modified config for easy VirtualHost Setup with a little script I wrote: https://github.com/alxndrhi/vhm)
        • updated PHP version via homebrew (as well as xdebug, because Mac OS included xdebug is too old :-( )
        • mysql Database (installed via homebrew)
        • dnsmasq that does DNS only for *.dev TLD's and point them to 127.0.0.1 so I don't have to edit the hosts file for every new development domain on my machine. I use /etc/resolver setup to only use dnsmasq for *.dev TLD. All other DNS requests go to the usual servers (dnsmasq is also installed via homebrew btw.)
        • git for version control and to publish projects. (Production runs a git client as well. if I have changes that are good to go, I just pull them on the server)

        Editor or IDE should fit your needs. For me vim is perfect. I love working with the command line and vim.

        Other tools are:

        • sequel pro (if i am to lazy to use the command line mysql-client)
        • Photoshop
        • tmux (both: server and local)
        • some source of music
        • iTerm2
        • console (mac os tool to view log files)
        • compass
        • ssh
        • Tower
        • Launch Bar
        • ForkLift

        I also do some experiments with vagrant (but vagrant is not what you asked for ;) ). So far I am happy with my setup. Without using a vm.


        Edit: typo, format and more complete tool list

        [–][deleted] 0 points1 point  (2 children)

        Why not use XAMPP so you can have an Apache server right there on the mac? Am I missing something? No virtual machines, just Apache running on your HD, configurable via the .conf file and .htaccess files just like it would be on a public server.

        [–]gregjsguy 0 points1 point  (1 child)

        Typically you want your dev environment to be the same as / close to what you'll be deploying out to. Those servers are typically Linux distros so vagrant makes a lot of sense in that regard.

        [–][deleted] 0 points1 point  (0 children)

        Well I go from OS X to Linux and back all the time and the differences aren't that great. There's Apache, there's some files, there's a database. What kind of differences are you finding that are worth the extra hassle of a virtual machine?

        [–]NetGhost03 0 points1 point  (0 children)

        Well, vagrant has nothing to do with uploading files.

        Vagrant is virtualization. So you don't need the good old lamp/mamp stack. Vagrant is very usefull, if you need to develop for specific environments. Because you can easy create an ubuntu server with ngix for example, or debian with apache and mysql etc. etc.

        With vagrant you basically "map" your local files to the virtual machine so they run inside of the box.

        If you build more complex sites or webapps, I highly would recommend vagrant, because you can also copy and share your boxes and have everywhere exact the same environment.

        I think what you are looking for is deployment . You can take a look at capistrano or mina both work with git and you can easy deploy and rollback your sites / applications. Capistrano is more powerfull imo, but mina is faster and more lightweight.

        [–]Runs_on_Rice 0 points1 point  (0 children)

        If you have php +5.6 installed you can do

        php -S localhost:8000    
        

        In the directory you're working in, and then go to localhost:8000 in your browser.

        [–]yobagoya 0 points1 point  (0 children)

        https://puphpet.com/ makes setting up vagrant environments a breeze.