Requirements
-
XCode
-
Git (easy via Homebrew)
-
node.js – http://nodejs.org/download/ or https://github.com/joyent/node/wiki/installation
-
SASS – http://sass-lang.com/install
-
LESS – http://lesscss.org/
-
GruntJS – http://gruntjs.com/getting-started
Grunt Plugins
-
Uglify (for compiling JS files) – https://github.com/gruntjs/grunt-contrib-uglify
Example:
npm install grunt --save-dev
npm install grunt-contrib-uglify --save-dev
Use with SublimeText
For a faster workflow, I use SublimeText.
Additional Requirements
-
SublimeText – http://www.sublimetext.com/
-
SublimeText Package Control – https://sublime.wbond.net/
-
Sublime FTP – http://wbond.net/sublime_packages/sftp (has trial and paid version)
-
Ruby
Build System
Build systems make it easier to compile everything (like your Grunt) upon saving, without having to enter code in vim.
Here’s a sample Build System (to create a new one: Tools > Build System > New Build System) to use with Grunt:
{
"cmd": ["grunt", "default"],
"selector": ["Gruntfile.js"],
"path": "/usr/local/bin:/usr/local/sbin:/Users/YOURNAME/.rvm/gems/ruby-2.0.0-p0/bin",
"working_dir": "${project_path:${folder}}",
"osx": {
"cmd": ["grunt", "default"]
}
}
** Make necessary adjustments on your path if you’re using something different.
Auto-upload on server with SFTP
Use SFTP with SublimeText to automatically reflect all changes you make locally to the test server.
Leave a Reply