lib/susanoo/cli/project.rb in susanoo-0.10.0 vs lib/susanoo/cli/project.rb in susanoo-0.11.1

- old
+ new

@@ -1,9 +1,9 @@ require 'thor' require 'susanoo/generators' +require 'susanoo/irb' - module Susanoo module CLI class Project < Thor include ::Thor::Actions @@ -13,10 +13,11 @@ map 's' => :server map 'g' => :generate map 'r' => :run_in map 'd' => :destroy map 'b' => :build + map 'c' => :console # Set the project root def self.root=(path) @@root = path Susanoo::Project.path = path @@ -107,9 +108,17 @@ build inside Susanoo::Project.path do system "cordova run #{platform.to_s}" end + end + + desc 'console', 'Run pry in environment of `Susanoo`. ' + def console + project_root = Susanoo::Project.path + require File.join(project_root, 'config/routes') + + IRB.start_session(binding) end private # Private ---------------------------