$LOAD_PATH.unshift(File.dirname(__FILE__)) module Xmvc class Builder < Thor autoload :Vendor, 'builders/vendor' include Thor::Actions desc "all", "Build all assets" def all(*params) Xmvc.ui.warn('build all assets with sprcokets') sec = Sprockets::Secretary.new({ :source_files => Xmvc::Config["javascripts"] }) #create_file("public/javascripts/app/app-all-debug.js", sec.concatenation) end desc "setup", "Initialize config file" def setup Xmvc.ui.warn("Builder setup") Xmvc.secretary = Sprockets::Secretary.new({}) Xmvc.public_path = File.expand_path("public") host = Vendor.new([], {}) host.invoke("app", [Xmvc.environment]) end private end end