bin/sv in smallvictories-0.0.4 vs bin/sv in smallvictories-0.0.5

- old
+ new

@@ -7,10 +7,11 @@ Usage: sv [COMMAND] [OPTIONS] Commands: bootstrap, bootstrap FOLDER Setup folder with default files compile Compile files + open Open index.html in destination folder watch Watch for changes and compile files help Prints this help document version Prints the small victories gem version Options: @@ -33,10 +34,15 @@ compiler.compile_css compiler.compile_js compiler.compile_html end +def open + config = SmallVictories::Configuration.new + system("open #{config.full_destination_path}index.html") +end + def watch config = SmallVictories::Configuration.new compiler = SmallVictories::Compiler.new(config: config) watcher = SmallVictories::Watcher.new(compiler: compiler) watcher.watch @@ -49,9 +55,11 @@ puts help when 'bootstrap' bootstrap ARGV[1] when 'compile' compile +when 'open' + open when 'watch' watch else puts "`#{ARGV[0]}` command not found.\n" puts help