Sha256: 339c8a6cff3f3860df2ee4101690cbc4bec4dc4361be95a732982a7ae04473ce

Contents?: true

Size: 975 Bytes

Versions: 4

Compression:

Stored size: 975 Bytes

Contents

require 'thor'
require 'thor/actions'

module Susanoo
  class Controller

    include Sprockets::Helpers

    attr_accessor :environment
    attr_accessor :debug
    attr_accessor :project_root

    def initialize
      @project_root = Susanoo::Project.path

      @environment = Sprockets::Environment.new(@project_root) do |env|
        env.logger = Logger.new(STDOUT)
      end

      #@environment.append_path(@project_root)
      @environment.append_path(File.join(@project_root, 'src', 'assets'))
      @environment.append_path(File.join(@project_root, 'src', 'assets', 'javascripts'))
      @environment.append_path(File.join(@project_root, 'src', 'assets', 'stylesheets'))
      @environment.append_path(File.join(@project_root, 'src', 'assets', 'images'))
      @environment.append_path(File.join(@project_root, 'src', 'assets', 'fonts'))

      Susanoo::StaticGenerator.register self.class
    end

    def static_compile?
      @static_compile
    end


  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
susanoo-0.8.0 lib/susanoo/controller.rb
susanoo-0.7.4 lib/susanoo/controller.rb
susanoo-0.7.2 lib/susanoo/controller.rb
susanoo-0.7.1 lib/susanoo/controller.rb