Class: MiddlemanEmberScaffold::Generators::Scaffold

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/middleman_ember_scaffold/generators/scaffold.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



5
6
7
# File 'lib/middleman_ember_scaffold/generators/scaffold.rb', line 5

def self.source_root
  File.expand_path(File.dirname(__FILE__), "../template")
end

Instance Method Details

#scaffold(*args) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/middleman_ember_scaffold/generators/scaffold.rb', line 10

def scaffold(*args)
  destination_root=args[0]
  src = File.expand_path(File.join(File.dirname(__FILE__), "../template"))
  directory(src, destination_root)
  Dir.chdir(destination_root)
  run_bundle
  bundle_command('exec middleman build')
end