Class: Blacksmith::Cli
- Inherits:
-
Thor
- Object
- Thor
- Blacksmith::Cli
- Includes:
- Thor::Actions
- Defined in:
- lib/blacksmith/cli.rb,
lib/blacksmith/cli/init.rb,
lib/blacksmith/cli/build.rb,
lib/blacksmith/cli/watch.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.pwd ⇒ Object
7 8 9 |
# File 'lib/blacksmith/cli.rb', line 7 def self.pwd Dir.pwd end |
.source_root ⇒ Object
4 5 6 |
# File 'lib/blacksmith/cli.rb', line 4 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#build ⇒ Object
4 5 6 |
# File 'lib/blacksmith/cli/build.rb', line 4 def build Blacksmith.app.build end |
#init(project_name) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/blacksmith/cli/init.rb', line 5 def init(project_name) create_file "#{project_name}/config.rb" do "set :build_files, ['#{project_name}']" "set :jshint, false # in development " "set :gzip, true" "set :compile, false" end create_file "#{project_name}/source/#{project_name}.js" create_file "#{project_name}/build/.gitkeep" end |
#watch ⇒ Object
4 5 |
# File 'lib/blacksmith/cli/watch.rb', line 4 def watch end |