#!/usr/bin/env ruby require "thor" module MadChatter class Cli < Thor include Thor::Actions def self.source_root File.expand_path("../", File.dirname(__FILE__)) end desc "new", "Creates a scaffold of a new Mad Chatter chatroom" def new(name) empty_directory "#{name}/extensions" copy_file "README", "#{name}/README" copy_file "LICENSE", "#{name}/LICENSE" copy_file "templates/index.html", "#{name}/web/index.html" copy_file "templates/javascript.js", "#{name}/web/javascript.js" copy_file "templates/stylesheets/reset.css", "#{name}/web/stylesheets/reset.css" copy_file "templates/stylesheets/styles.css", "#{name}/web/stylesheets/styles.css" end end end MadChatter::Cli.start