Sha256: 8db269c11a3fa0f0a6dee49e76f52b0ce8d4d766c0723ebc0937646ea4730482

Contents?: true

Size: 1006 Bytes

Versions: 6

Compression:

Stored size: 1006 Bytes

Contents

require 'fileutils'
require File.join(File.dirname(__FILE__), 'base')
require File.join(File.dirname(__FILE__), 'update_project')

module Compass
  module Commands
    class CreateProject < Base
      
      attr_accessor :project_directory, :project_name

      def initialize(working_directory, options)
        super(working_directory, options)
        self.project_name = options[:project_name]
        self.project_directory = File.expand_path File.join(working_directory, project_name)
      end
      
      # all commands must implement perform
      def perform
        directory nil, options
        directory 'stylesheets', options.merge(:force => true)
        directory 'src', options.merge(:force => true)
        template 'project/screen.sass', 'src/screen.sass', options
        template 'project/print.sass',  'src/print.sass', options
        template 'project/ie.sass',     'src/ie.sass', options
        UpdateProject.new(working_directory, options).perform
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
chriseppstein-compass-0.1.1 lib/compass/commands/create_project.rb
chriseppstein-compass-0.3.0 lib/compass/commands/create_project.rb
chriseppstein-compass-0.3.1 lib/compass/commands/create_project.rb
chriseppstein-compass-0.3.2 lib/compass/commands/create_project.rb
chriseppstein-compass-0.3.3 lib/compass/commands/create_project.rb
chriseppstein-compass-0.3.4 lib/compass/commands/create_project.rb