Class: CLI
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
50 51 52 |
# File 'lib/volt/cli.rb', line 50 def self.source_root File.(File.join(File.dirname(__FILE__), '../../templates')) end |
Instance Method Details
#console ⇒ Object
16 17 18 19 |
# File 'lib/volt/cli.rb', line 16 def console require 'volt/console' Console.start end |
#gem(name) ⇒ Object
44 45 46 47 48 |
# File 'lib/volt/cli.rb', line 44 def gem(name) require 'volt/cli/new_gem' NewGem.new(self, name, ) end |
#new(name) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/volt/cli.rb', line 8 def new(name) directory("project", name) say "Bundling Gems...." `cd #{name} ; bundle -j 4` end |
#server ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/volt/cli.rb', line 22 def server require 'thin' require 'fileutils' # If we're in a Volt project, clear the temp directory # TODO: this is a work around for a bug when switching between # source maps and non-source maps. if File.exists?("config.ru") && File.exists?("Gemfile") FileUtils.rm_rf("tmp/.") end ENV['SERVER'] = 'true' Thin::Runner.new(['start']).run! end |