From 38316cf79ee698ba9e03147f60acea5ba7ead84f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 19 Jul 2014 21:35:49 -0400 Subject: [PATCH] Include node in Homebrew; install (js|json)hint for emacs --- rake/pkg/emacs.rake | 15 ++++++++++----- rake/pkg/homebrew.rake | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/rake/pkg/emacs.rake b/rake/pkg/emacs.rake index c51226ff..98a6fd19 100644 --- a/rake/pkg/emacs.rake +++ b/rake/pkg/emacs.rake @@ -4,23 +4,28 @@ task :emacs => "emacs:update" namespace :emacs do task :install do - Homebrew.install("emacs", "--with-gnutls --cocoa --keep-ctags --srgb") - Homebrew.install "aspell" - github('hlissner/emacs.d', '~/.emacs.d') + unless Dir.exists?(File.expand_path("~/.emacs.d")) + github('hlissner/emacs.d', '~/.emacs.d') + Homebrew.install("emacs", "--with-gnutls --cocoa --keep-ctags --srgb") + Homebrew.install "aspell" + + sh_safe "/usr/local/bin/npm install jshint -g" + sh_safe "/usr/local/bin/npm install jsonlint -g" + end end task :update do echo "Updating emacs.d" sh_safe "cd ~/.emacs.d && git pull" - echo "You'll have to update emacs manually!" + echo "You'll have to update emacs packages manually!" end task :remove do echo "Uninstalling emacs" Homebrew.remove "emacs" Homebrew.remove "aspell" - rm_rf "~/.emacs.d" if Dir.exists? "~/.emacs.d" + rm_rf "~/.emacs.d" if Dir.exists?(File.expand_path("~/.emacs.d")) end end diff --git a/rake/pkg/homebrew.rake b/rake/pkg/homebrew.rake index 62110e37..b6a574a7 100644 --- a/rake/pkg/homebrew.rake +++ b/rake/pkg/homebrew.rake @@ -30,6 +30,7 @@ namespace :homebrew do luajit readline openssl + node }.each { |pkg| Homebrew.install pkg } %w{