Sha256: 92624908b34f98320bb52a0031f93d4104ec08a882d6a6403920dc3337278608

Contents?: true

Size: 974 Bytes

Versions: 9

Compression:

Stored size: 974 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

9 entries across 9 versions & 1 rubygems

Version Path
susanoo-0.13.2 lib/susanoo/controller.rb
susanoo-0.13.1 lib/susanoo/controller.rb
susanoo-0.13.0 lib/susanoo/controller.rb
susanoo-0.12.3 lib/susanoo/controller.rb
susanoo-0.12.2 lib/susanoo/controller.rb
susanoo-0.12.1 lib/susanoo/controller.rb
susanoo-0.12.0 lib/susanoo/controller.rb
susanoo-0.11.1 lib/susanoo/controller.rb
susanoo-0.10.0 lib/susanoo/controller.rb