lib/pieces/cli.rb in pieces-0.3.0 vs lib/pieces/cli.rb in pieces-0.3.1
- old
+ new
@@ -15,10 +15,18 @@
print "Building pieces into #{path}... "
Pieces::Builder.build(path: path)
puts 'done.'
end
- map %w[--version -v] => :version
+ map %w(s) => :server
+
+ desc 'server DIR', 'serve application in DIR'
+ def server(path = Dir.pwd)
+ puts "Serving pieces from #{path}/build... "
+ Pieces::Server.start(path: path)
+ end
+
+ map %w(--version -v) => :version
desc '--version', 'get pieces version'
def version
puts "pieces v#{Pieces::VERSION}"
end