ichiban 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ichiban/file.rb +4 -1
- data/lib/ichiban/html_compiler.rb +1 -1
- data/lib/ichiban/scripts.rb +2 -2
- metadata +1 -1
data/lib/ichiban/file.rb
CHANGED
@@ -120,7 +120,10 @@ module Ichiban
|
|
120
120
|
deps.each do |dep|
|
121
121
|
# dep is a path relative to the project root
|
122
122
|
if File.exists?(File.join(Ichiban.project_root, dep))
|
123
|
-
|
123
|
+
# Ignore partial templates
|
124
|
+
unless File.basename(dep).start_with?('_')
|
125
|
+
Ichiban::HTMLFile.new(dep).update
|
126
|
+
end
|
124
127
|
else
|
125
128
|
Dependencies.delete_dep('.layout_dependencies.json', dep)
|
126
129
|
end
|
@@ -25,7 +25,7 @@ module Ichiban
|
|
25
25
|
|
26
26
|
ctx = Ichiban::HTMLCompiler::Context.new(ivars_for_ctx)
|
27
27
|
|
28
|
-
inner_html = Eruby.new(File.read(@html_file.abs)).evaluate(ctx)
|
28
|
+
inner_html = Eruby.new(File.read(@html_file.abs), :filename => @html_file.abs).evaluate(ctx)
|
29
29
|
|
30
30
|
# Compile Markdown if necessary
|
31
31
|
if (@html_file.abs.end_with?('.markdown') or @html_file.abs.end_with?('.md'))
|
data/lib/ichiban/scripts.rb
CHANGED
@@ -35,8 +35,8 @@ module Ichiban
|
|
35
35
|
# This is how Ichiban knows to re-run the script when one of the files changes. Pass in a path
|
36
36
|
# relative to the project root.
|
37
37
|
#
|
38
|
-
# However, you don't need to declare dependencies for the
|
39
|
-
# automatically be tracked.
|
38
|
+
# However, you don't need to declare dependencies for the files in the html directory that the
|
39
|
+
# script uses. Those will automatically be tracked.
|
40
40
|
def depends_on(ind_path)
|
41
41
|
if ind_path.start_with?('/')
|
42
42
|
raise(ArgumentError, 'depends_on must be passed a path relative to the project root, e.g. "data/employees.xml"')
|