chisel 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/chisel/new_site/_config.yml +3 -1
- data/lib/chisel/site_directory.rb +2 -2
- data/lib/chisel/view.rb +1 -1
- metadata +1 -1
@@ -10,8 +10,10 @@
|
|
10
10
|
###############################################################################
|
11
11
|
|
12
12
|
# The output directory is the root directory where the site will be generated.
|
13
|
-
# This directory will be completely replaced every time the generator is run.
|
14
13
|
output_dir: _output
|
15
14
|
|
15
|
+
# This directory will be completely replaced every time the generator is run.
|
16
|
+
replace_output_dir: yes
|
17
|
+
|
16
18
|
# Any further configuration options specified will be available to views in the
|
17
19
|
# variable @config.
|
@@ -42,8 +42,8 @@ module Chisel
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def clear_output_dir
|
45
|
-
FileUtils.rm_r(output_dir) if File.exists?(output_dir)
|
46
|
-
FileUtils.
|
45
|
+
FileUtils.rm_r(output_dir) if File.exists?(output_dir) and @config['replace_output_dir'] != false
|
46
|
+
FileUtils.mkdir_p(output_dir)
|
47
47
|
end
|
48
48
|
|
49
49
|
def require_resources
|
data/lib/chisel/view.rb
CHANGED
@@ -68,7 +68,7 @@ module Chisel
|
|
68
68
|
output_path = file_output_dir.join(output_basename)
|
69
69
|
end
|
70
70
|
|
71
|
-
return if @@output_paths.index(output_path)
|
71
|
+
return if @@output_paths.index(output_path)
|
72
72
|
@@output_paths << output_path
|
73
73
|
|
74
74
|
FileUtils.mkdir_p(output_path.dirname)
|