$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.secretary = Sprockets::Secretary.new({}) Xmvc.public_path = File.expand_path("public") host = Vendor.new([], { :environment => Xmvc.environment }) host.invoke("app") end private end end