lib/susanoo/controller.rb in susanoo-0.5.1 vs lib/susanoo/controller.rb in susanoo-0.7.0
- old
+ new
@@ -1,5 +1,8 @@
+require 'thor'
+require 'thor/actions'
+
module Susanoo
class Controller
include Sprockets::Helpers
@@ -12,15 +15,21 @@
@environment = Sprockets::Environment.new(@project_root) do |env|
env.logger = Logger.new(STDOUT)
end
- @environment.append_path(File.join(@project_root, 'www', 'assets'))
- @environment.append_path(File.join(@project_root, 'www', 'assets', 'javascripts'))
- @environment.append_path(File.join(@project_root, 'www', 'assets', 'stylesheets'))
- @environment.append_path(File.join(@project_root, 'www', 'assets', 'images'))
- @environment.append_path(File.join(@project_root, 'www', 'assets', 'fonts'))
+ @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