chisel 0.0.3 → 0.0.4

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.
@@ -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.mkdir(output_dir)
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
@@ -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) or output_path.exist?
71
+ return if @@output_paths.index(output_path)
72
72
  @@output_paths << output_path
73
73
 
74
74
  FileUtils.mkdir_p(output_path.dirname)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: chisel
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Rockwell Schrock