project_templater 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -0
- data/lib/generators/generator.rb +2 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -60,8 +60,13 @@ Similarly, there is a `pre_install` method which is run just before `run`. Again
|
|
60
60
|
|
61
61
|
## Changelog
|
62
62
|
|
63
|
+
__0.3.2__
|
64
|
+
- logs to the terminal when it creates a file or folder
|
65
|
+
|
63
66
|
__0.3.1__
|
64
67
|
- No nasty exception if the generator doesn't exist.
|
68
|
+
- run `project_templater` without arguments to see a list of available generators
|
69
|
+
- `post_install` command line output is now shown
|
65
70
|
|
66
71
|
__0.3.0__
|
67
72
|
- Remove all references to `nodefetch`
|
data/lib/generators/generator.rb
CHANGED
@@ -9,7 +9,6 @@ class Generator
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def pre_install
|
12
|
-
|
13
12
|
end
|
14
13
|
|
15
14
|
def post_install
|
@@ -18,10 +17,12 @@ class Generator
|
|
18
17
|
def make_file(path, &block)
|
19
18
|
contents = ""
|
20
19
|
contents = block.call if block_given?
|
20
|
+
puts "Writing file: #{@base + path}"
|
21
21
|
File.open(@base + path, 'w') {|f| f.write(contents) }
|
22
22
|
end
|
23
23
|
|
24
24
|
def make_dir(path)
|
25
|
+
puts "Writing folder: #{@base + path}"
|
25
26
|
FileUtils.mkdir_p(@base + path)
|
26
27
|
end
|
27
28
|
end
|