Sha256: 0ee1b8c0e721d466f0a786dedd06d8a89c17c4fc6b2f300a65e0fd4ccab420dd

Contents?: true

Size: 564 Bytes

Versions: 4

Compression:

Stored size: 564 Bytes

Contents

#!/usr/bin/env ruby

unless ARGV.length >= 2
  puts "You must specify either lint or render. Example usage:"
  puts "  playgroundbook [lint|render] file_name"
  exit 1
end

command = ARGV[0]
file_name = ARGV[1]

require "playgroundbook"

if command == "lint"
  Playgroundbook::Linter.new(file_name).lint
elsif command == "render"
  Playgroundbook::Renderer.new(file_name).render
elsif command == "wrapper"
  playground_name = ARGV[2]
  Playgroundbook::MarkdownWrapper.new(file_name, playground_name).generate
else
  puts "Unknown command: #{command}"
  exit 1
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
playgroundbook-1.0.0 bin/playgroundbook
playgroundbook-0.6.0 bin/playgroundbook
playgroundbook-0.5.0 bin/playgroundbook
playgroundbook-0.4.0 bin/playgroundbook