Sha256: e3db338bd211db8f53ba1bd0e05b8ae0c95040c54a1f5088b76893b740638a39
Contents?: true
Size: 1.01 KB
Versions: 2
Compression:
Stored size: 1.01 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 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
flutterby-0.0.7 | lib/flutterby/cli.rb |
flutterby-0.0.6 | lib/flutterby/cli.rb |