bin/sv in smallvictories-0.0.1 vs bin/sv in smallvictories-0.0.2

- old
+ new

@@ -1,13 +1,14 @@ #!/usr/bin/env ruby -require './lib/smallvictories' +require 'smallvictories' def help %Q( Usage: sv [COMMAND] [OPTIONS] Commands: + watch Watch for changes and compile files hello Puts Hello World! help Prints this help document version Prints the small victories gem version Options: -h, --help Prints this help document @@ -18,16 +19,23 @@ def hello puts SmallVictories.hello end +def watch + SmallVictories.setup + SmallVictories.watch +end + case ARGV[0] when '-v', '--version', 'version' puts SmallVictories::VERSION when '-h', '--help', 'help' puts help when 'hello' hello +when 'watch' + watch else puts "`#{ARGV[0]}` command not found.\n" puts help end