Skip to content

Instantly share code, notes, and snippets.

@ivanoats
Created February 12, 2014 22:27
Show Gist options
  • Save ivanoats/8965823 to your computer and use it in GitHub Desktop.
Save ivanoats/8965823 to your computer and use it in GitHub Desktop.
<p>Ok, every cloud has a silver lining. Despite having a moment on how the <a href="http://docs.sublimetext.info/en/latest/reference/build_systems.html">Sublime Text Build tool configuration</a> works, I found an even easier way to run Grunt tasks from within Sublime. Here's how:</p>
<p>1. Press Command (or Control on Linux)-shift-P to bring up the command palette and start typing 'install' - you should see 'Package Control: Install Package'.</p>
<p>2. Hit enter, and then type 'Grunt'- you should see in small text a link to the Github repo for <a href="https://github.com/tvooo/sublime-grunt">tvooo/sublime-grunt</a>, press enter to install</p>
<p>3. &nbsp;Now if you press Command-shift-P, and type grunt, enter, you should see your grunt tasks</p>
<p>4. Press enter to run the grunt task</p>
<p>If this doesn't work, make sure you are starting Sublime Text via the 'subl .' command from your project directory. Don't start Sublime via the Dock or Unity menu.&nbsp;</p>
<p>Note: JSHint <em>is supposed to fail</em> if there are warnings. Fix the warnings, and JSHint will exit with no error status.</p>
<p>And, if you really want to learn more about the build tool in Sublime, which is a greatly useful way to customize your workflow, read the <a href="http://docs.sublimetext.info/en/latest/reference/build_systems.html">unofficial docs</a>, a <a href="http://logicmason.com/2013/adding-a-js-build-system-to-sublime/">blog post about a node build system</a>, and this <a href="http://stackoverflow.com/questions/17681395/creating-a-sublime-text-grunt-build-system-for-a-specific-target">stack overflow post</a>.</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment