Sha256: b747ee5869734eac447af9440e8168584675bea908e146a470a6f81ac8f38828

Contents?: true

Size: 1.24 KB

Versions: 4

Compression:

Stored size: 1.24 KB

Contents

require 'sprockets'
require 'fileutils'

require "requirejs_optimizer/errors"
require "requirejs_optimizer/step/base"
require "requirejs_optimizer/step/clean"
require "requirejs_optimizer/step/compress"
require "requirejs_optimizer/step/digestify"
require "requirejs_optimizer/step/finalize"
require "requirejs_optimizer/step/manifest"
require "requirejs_optimizer/step/optimize"
require "requirejs_optimizer/step/prepare"

require "requirejs_optimizer/build"
require "requirejs_optimizer/rake/utils"
require "requirejs_optimizer/rake/task"

require "requirejs_optimizer/version"


module RequirejsOptimizer

  def self.root
    Pathname.new(File.expand_path("../..", __FILE__))
  end

  def self.build_dir=(value)
    @build_dir = value
  end

  def self.build_dir
    Rails.root.join(@build_dir || "tmp/assets")
  end

  def self.target_dir
    build_dir.join("build")
  end

  def self.build_files(file_glob="*.*")
    Dir.glob(RequirejsOptimizer.build_dir.join('**', file_glob).to_s).reject { |f| f =~ /manifest\.yml$|build\.txt$/ }
  end

  def self.target_files(file_glob="*.*")
    Dir.glob(RequirejsOptimizer.target_dir.join('**', file_glob).to_s).reject { |f| f =~ /manifest\.yml$|build\.txt$/ }
  end

end

require "requirejs_optimizer/railtie" if defined?(Rails)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
requirejs_optimizer-0.3.2 lib/requirejs_optimizer.rb
requirejs_optimizer-0.2.0 lib/requirejs_optimizer.rb
requirejs_optimizer-0.1.0 lib/requirejs_optimizer.rb
requirejs_optimizer-0.0.5 lib/requirejs_optimizer.rb