Skip to content

Commit

Permalink
load_file.txt depends on the manifest.
Browse files Browse the repository at this point in the history
  • Loading branch information
gga committed Dec 18, 2012
1 parent b5c100a commit 25b40b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/calatrava/app_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def builder_task
end

app_files += @manifest.css_tasks(build_styles_dir)
app_files << file("#{build_dir}/load_file.txt" => build_dir) do |t|
app_files << file("#{build_dir}/load_file.txt" => [build_dir, @manifest.file]) do |t|
File.open(t.name, "w+") { |f| f.puts load_instructions }
end

Expand Down
8 changes: 7 additions & 1 deletion lib/calatrava/manifest.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
module Calatrava

class Manifest
include Rake::DSL

attr_reader :file

def initialize(path, app_dir, kernel, shell)
@path, @kernel, @shell = path, kernel, shell
@feature_list = YAML.load(IO.read("#{@path}/#{app_dir}/manifest.yml"))
@file = "#{app_dir}/manifest.yml"
@feature_list = YAML.load(IO.read("#{@path}/#{@file}"))
end

def features
Expand Down Expand Up @@ -40,6 +45,7 @@ def css_files
end

def css_tasks(output_dir)
mkdir_p output_dir
css_files.collect do |style_file|
file "#{output_dir}/#{File.basename(style_file, '.*')}.css" => [output_dir, style_file] do |t|
if style_file =~ /css$/
Expand Down

0 comments on commit 25b40b6

Please sign in to comment.