diff --git a/lib/neat.rb b/lib/neat.rb index 82aeada4..7f9ad1bd 100644 --- a/lib/neat.rb +++ b/lib/neat.rb @@ -1,20 +1,4 @@ -require "sass" require "neat/generator" -module Neat - if defined?(Rails) && defined?(Rails::Engine) - class Engine < ::Rails::Engine - require 'neat/engine' - end - - module Rails - class Railtie < ::Rails::Railtie - rake_tasks do - load "tasks/install.rake" - end - end - end - else - Sass.load_paths << File.expand_path("../../core", __FILE__) - end -end +neat_path = File.expand_path("../../core", __FILE__) +ENV["SASS_PATH"] = File.join([ENV["SASS_PATH"], neat_path].compact) diff --git a/lib/neat/engine.rb b/lib/neat/engine.rb deleted file mode 100644 index 11650d68..00000000 --- a/lib/neat/engine.rb +++ /dev/null @@ -1,5 +0,0 @@ -module Neat - class Engine < Rails::Engine - # auto wire - end -end diff --git a/lib/tasks/install.rake b/lib/tasks/install.rake deleted file mode 100644 index c0ae7d70..00000000 --- a/lib/tasks/install.rake +++ /dev/null @@ -1,19 +0,0 @@ -require "fileutils" -require "find" - -namespace :neat do - desc "Copy Neat's files to the Rails assets directory." - task :install, [:sass_path] do |t, args| - args.with_defaults(:sass_path => 'public/stylesheets/sass') - source_root = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) - FileUtils.mkdir_p("#{Rails.root}/#{args.sass_path}/neat") - FileUtils.cp_r("#{source_root}/core/.", "#{Rails.root}/#{args.sass_path}/neat", { :preserve => true }) - - Find.find("#{Rails.root}/#{args.sass_path}/neat") do |path| - if path.end_with?(".css.scss") - path_without_css_extension = path.gsub(/\.css\.scss$/, ".scss") - FileUtils.mv(path, path_without_css_extension) - end - end - end -end