Sha256: 1679f9ec5e56f8b1c24034862a0ba39f3fa23a3c31896d57b34fbdf588d2b7d4

Contents?: true

Size: 881 Bytes

Versions: 6

Compression:

Stored size: 881 Bytes

Contents

module Eyeballs
  class AppGenerator < Thor::Group
    include Thor::Actions
    include Eyeballs::AppDetector

    desc "Creates a new eyeballs.js app"
  
    argument :name
  
    def self.source_root
      File.join(File.dirname(__FILE__), '..', '..')
    end
  
    def greeting
      $stdout.puts "Creating new eyeballs.js app #{name}"
    end
  
    def build_the_app
      directory "templates/app_root", new_app_path
      copy_file 'dist/jquery/jquery-1.4.2.min.js', "#{new_app_path}/vendor/jquery/jquery-1.4.2.min.js"
      copy_file 'dist/mustache/mustache.0.3.0.js', "#{new_app_path}/vendor/mustache/mustache.0.3.0.js"
      directory "src", "#{new_app_path}/vendor/eyeballs/"
      template "templates/initializer.js", "#{new_app_path}/config/initializer.js"
    end
  
    def farewell      
      $stdout.puts "Thank you for installing eyeballs.js"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
eyeballs-0.5.10.1 lib/eyeballs/app_generator.rb
eyeballs-0.5.10 lib/eyeballs/app_generator.rb
eyeballs-0.5.9 lib/eyeballs/app_generator.rb
eyeballs-0.5.8.2 lib/eyeballs/app_generator.rb
eyeballs-0.5.8.1 lib/eyeballs/app_generator.rb
eyeballs-0.5.8 lib/eyeballs/app_generator.rb