Sha256: 17080fb898033dc13245b61c464a05b2ad978294a6d003431844a3123fd88f33
Contents?: true
Size: 1.23 KB
Versions: 4
Compression:
Stored size: 1.23 KB
Contents
require 'commander' require 'flutterby' Commander.configure do program :name, 'Flutterby' program :version, Flutterby::VERSION program :description, 'There are many static site generators. This one is mine.' command :build do |c| c.syntax = 'flutterby build [options]' c.description = "Build your website." c.option '--in DIR', String, "Directory containing your source files" c.option '--out DIR', String, "Target directory" c.action do |args, options| options.default in: "./site/", out: "./_build/" root = Flutterby.from(options.in, name: "/") root.export(options.out) end end command :serve do |c| c.syntax = 'flutterby serve [options]' c.description = "Serve your website for development." c.option '--in DIR', String, "Directory containing your source files" c.action do |args, options| options.default in: "./site/" root = Flutterby.from(options.in, name: "/") server = Flutterby::Server.new(root) server.run! end end command :test do |c| c.syntax = 'flutterby test' c.description = 'TEST. Yo.' c.action do |args, options| root = Flutterby.from("./in", name: "/") root.list root.export("./out/") end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
flutterby-0.0.5 | lib/flutterby/cli.rb |
flutterby-0.0.4 | lib/flutterby/cli.rb |
flutterby-0.0.3 | lib/flutterby/cli.rb |
flutterby-0.0.2 | lib/flutterby/cli.rb |