Sha256: 4b2b533681100b285013d098eb40d80c515067a5acc13466bc4c30e7f636907a

Contents?: true

Size: 572 Bytes

Versions: 3

Compression:

Stored size: 572 Bytes

Contents

#!/usr/bin/env ruby

unless ARGV.length >= 2
  puts "You must specify either lint or render. Example usage:"
  puts "  playgroundbook [lint|render|wrapper] 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

3 entries across 3 versions & 1 rubygems

Version Path
playgroundbook-1.2.0 bin/playgroundbook
playgroundbook-1.1.1 bin/playgroundbook
playgroundbook-1.1.0 bin/playgroundbook