Skip to content

Instantly share code, notes, and snippets.

@rsolomo
Created March 26, 2013 20:36
Show Gist options
  • Save rsolomo/5248993 to your computer and use it in GitHub Desktop.
Save rsolomo/5248993 to your computer and use it in GitHub Desktop.
Runs 'npm test' on save if a package.json is present in the current directory. I just have this as part of my vimrc.
if filereadable("package.json")
autocmd BufWritePost <buffer> !npm test
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment