Module: RequirejsOptimizer

Defined in:
lib/requirejs_optimizer.rb,
lib/requirejs_optimizer/build.rb,
lib/requirejs_optimizer/errors.rb,
lib/requirejs_optimizer/version.rb,
lib/generators/install_generator.rb,
lib/requirejs_optimizer/rake/task.rb,
lib/requirejs_optimizer/step/base.rb,
lib/requirejs_optimizer/rake/utils.rb,
lib/requirejs_optimizer/step/clean.rb,
lib/requirejs_optimizer/step/prepare.rb,
lib/requirejs_optimizer/step/compress.rb,
lib/requirejs_optimizer/step/finalize.rb,
lib/requirejs_optimizer/step/manifest.rb,
lib/requirejs_optimizer/step/optimize.rb,
lib/requirejs_optimizer/step/digestify.rb

Defined Under Namespace

Modules: Errors, Rake, Step Classes: Build, InstallGenerator

Constant Summary collapse

VERSION =
"0.4.2"

Class Method Summary collapse

Class Method Details

.build_dirObject



34
35
36
# File 'lib/requirejs_optimizer.rb', line 34

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

.build_dir=(value) ⇒ Object



30
31
32
# File 'lib/requirejs_optimizer.rb', line 30

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

.build_files(file_glob = "*.*") ⇒ Object



42
43
44
# File 'lib/requirejs_optimizer.rb', line 42

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

.rootObject



26
27
28
# File 'lib/requirejs_optimizer.rb', line 26

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

.target_dirObject



38
39
40
# File 'lib/requirejs_optimizer.rb', line 38

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

.target_files(file_glob = "*.*") ⇒ Object



46
47
48
# File 'lib/requirejs_optimizer.rb', line 46

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