project_templater 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -1
- data/lib/generators/generator.rb +4 -0
- data/lib/generators/jekyll_basic.rb +15 -0
- data/lib/project_templater.rb +1 -0
- metadata +2 -1
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Project Templater
|
2
2
|
|
3
|
-
__V0.
|
3
|
+
__V0.2.0__
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -39,6 +39,7 @@ Run the `sinatra_basic` generator and output to the `pwd/foo/ directory`.
|
|
39
39
|
- `js_project`
|
40
40
|
- `ruby_project`
|
41
41
|
- `html_proto`
|
42
|
+
- `jekyll_basic`
|
42
43
|
|
43
44
|
## Adding a Generator
|
44
45
|
|
@@ -55,8 +56,14 @@ Define a `run` method that will be called. There are two methods available:
|
|
55
56
|
|
56
57
|
You can also define a `post_install` method that is run after the `run` method has. You also have access to the `@base` variable, which is the directory the generator was run in.
|
57
58
|
|
59
|
+
Similarly, there is a `pre_install` method which is run just before `run`. Again, it has access to `@base`.
|
60
|
+
|
58
61
|
## Changelog
|
59
62
|
|
63
|
+
__0.2.0__
|
64
|
+
- added `jekyll_basic` generator
|
65
|
+
- add `pre_install` method for generators
|
66
|
+
|
60
67
|
__0.1.2__
|
61
68
|
- added `html_proto` generator, designed for quick HTML prototypes
|
62
69
|
|
data/lib/generators/generator.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative "./generator.rb"
|
2
|
+
|
3
|
+
class JekyllBasic < Generator
|
4
|
+
def run
|
5
|
+
make_dir("_posts")
|
6
|
+
make_dir("_layouts")
|
7
|
+
make_dir("css")
|
8
|
+
make_dir("js")
|
9
|
+
make_dir("img")
|
10
|
+
|
11
|
+
make_file("index.html")
|
12
|
+
make_file("_layouts/default.html")
|
13
|
+
make_file("css/style.css")
|
14
|
+
end
|
15
|
+
end
|
data/lib/project_templater.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: project_templater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -20,6 +20,7 @@ extra_rdoc_files: []
|
|
20
20
|
files:
|
21
21
|
- lib/generators/generator.rb
|
22
22
|
- lib/generators/html_proto.rb
|
23
|
+
- lib/generators/jekyll_basic.rb
|
23
24
|
- lib/generators/js_project.rb
|
24
25
|
- lib/generators/ruby_project.rb
|
25
26
|
- lib/generators/sinatra_basic.rb
|