You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
38
-
39
-
## What is "Generate"?
40
-
41
-
Generate is a command line tool and developer framework for scaffolding out new GitHub projects using [generators](https://github.com/generate/generate/blob/master/docs/){generators.md} and [tasks](https://github.com/generate/generate/blob/master/docs/){tasks.md}.
42
-
43
-
Answers to prompts and the user's environment can be used to determine the templates, directories, files and contents to build. Support for [gulp](http://gulpjs.com), [base](https://github.com/node-base/base) and [assemble](https://github.com/assemble/assemble) plugins, and much more.
44
-
45
-
**For more information**:
46
-
47
-
* Visit the [generate project](https://github.com/generate/generate/)
48
-
* Visit the [generate documentation](https://github.com/generate/generate/blob/master/docs/)
49
-
* Find [generators on npm](https://www.npmjs.com/browse/keyword/generate-generator) (help us [author generators](https://github.com/generate/generate/blob/master/docs/){micro-generators.md})
50
-
51
16
## Getting started
52
17
53
18
### Install
54
19
55
20
**Installing the CLI**
56
21
57
-
To run the `git` generator from the command line, you'll need to install [Generate](https://github.com/generate/generate) globally first. You can do that now with the following command:
22
+
To run the `readme` generator from the command line, you'll need to install [Generate](https://github.com/generate/generate) globally first. You can do that now with the following command:
58
23
59
24
```sh
60
25
$ npm install --global generate
@@ -70,19 +35,19 @@ Install this module with the following command:
70
35
$ npm install --global generate-git
71
36
```
72
37
73
-
### Usage
38
+
### CLI
74
39
75
40
Run this generator's `default`[task](https://github.com/generate/generate/blob/master/docs/tasks.md#default) with the following command:
76
41
77
42
```sh
78
-
$ gen git
43
+
$ gen readme
79
44
```
80
45
81
46
**What will happen?**
82
47
83
48
Running `$ gen git` will run this generator's `default` task, which initializes a new git repository, git adds the files, and does a first commit with the message `first commit`.
84
49
85
-
When [generate](https://github.com/generate/generate) is installed globally, you can run this generator with the `$ gen git` command, or use in your own generator as a plugin or sub-generator to make it a continuous part of the build workflow when scaffolding out a new project.
50
+
When [generate](https://github.com/generate/generate) is installed globally, you can run this generator with the `$ gen readme` command, or use in your own generator as a plugin or sub-generator to make it a continuous part of the build workflow when scaffolding out a new project.
86
51
87
52
**What you should see in the terminal**
88
53
@@ -106,9 +71,7 @@ $ gen help
106
71
107
72
## Tasks
108
73
109
-
All available tasks.
110
-
111
-
### [default](generator.js#L25)
74
+
### [default](generator.js#L38)
112
75
113
76
Initialize a git repository, including `git add` and first commit.
114
77
@@ -118,7 +81,7 @@ Initialize a git repository, including `git add` and first commit.
118
81
$ gen git
119
82
```
120
83
121
-
### [first-commit](generator.js#L38)
84
+
### [first-commit](generator.js#L51)
122
85
123
86
Alias for the default task, to provide a semantic task name when using this generator as a plugin or sub-generator.
124
87
@@ -128,40 +91,63 @@ Alias for the default task, to provide a semantic task name when using this gene
128
91
$ gen git:first-commit
129
92
```
130
93
131
-
### [gitattributes](generator.js#L68)
94
+
### [clone](generator.js#L80)
132
95
133
-
Generate a `.gitattributes` file. You can override the default template by adding a custom template at the following path `~/templates/_gitattributes` (in user home). See the [git documentation](https://git-scm.com/docs/gitattributes) for `.gitattributes` files.
96
+
Alias for the default task, to provide a semantic task name when using this generator as a plugin or sub-generator.
134
97
135
98
**Example**
136
99
137
100
```sh
138
-
$ gen git:gitattributes
101
+
$ gen git:clone
102
+
$ gen git:git-clone # aliased for API usage
139
103
```
140
104
141
-
### [gitignore](generator.js#L81)
105
+
### [updater:prompt-git](generator.js#L111)
142
106
143
-
Generate a `.gitignore` file. You can override the default template by adding a custom template at the following path: `~/templates/_gitignore` (in user home).
107
+
Prompts the user to confirm if they'd like to initialize a git repository with first [first-commit](#first-commit).
144
108
145
109
**Example**
146
110
147
111
```sh
148
-
$ gen git:gitignore
112
+
$ gen updater:prompt-git
149
113
```
150
114
151
-
### [prompt-git](generator.js#L94)
115
+
##Next steps
152
116
153
-
Prompt the user to initialize a git repository and create a first commit, runs the [first-commit](#first-commit) task if specified by the user.
117
+
### Running unit tests
154
118
155
-
**Example**
119
+
It's never too early to begin running unit tests. When you're ready to get started, the following command will ensure the project's dependencies are installed then run all of the unit tests:
156
120
157
121
```sh
158
-
$ gen git:prompt-git
122
+
$ npm install &&test
159
123
```
160
124
161
-
Visit Generate's [documentation for tasks](https://github.com/generate/generate/blob/master/docs/){tasks.md}.
125
+
### Publishing your generator
126
+
127
+
If you're tests are passing and you're ready to publish your generator to [npm](https://www.npmjs.com), you can do that now with the following command:
128
+
129
+
**Are you sure you're ready?!**
130
+
131
+
Let's go!
132
+
133
+
```sh
134
+
$ npm publish
135
+
```
162
136
163
137
## About
164
138
139
+
### What is "Generate"?
140
+
141
+
Generate is a command line tool and developer framework for scaffolding out new GitHub projects using [generators](https://github.com/generate/generate/blob/master/docs/generators.md) and [tasks](https://github.com/generate/generate/blob/master/docs/tasks.md).
142
+
143
+
Answers to prompts and the user's environment can be used to determine the templates, directories, files and contents to build. Support for [gulp](http://gulpjs.com), [base](https://github.com/node-base/base) and [assemble](https://github.com/assemble/assemble) plugins, and much more.
144
+
145
+
**For more information**:
146
+
147
+
* Visit the [generate project](https://github.com/generate/generate/)
148
+
* Visit the [generate documentation](https://github.com/generate/generate/blob/master/docs/)
149
+
* Find [generators on npm](https://www.npmjs.com/browse/keyword/generate-generator) (help us [author generators](https://github.com/generate/generate/blob/master/docs/micro-generators.md))
150
+
165
151
### Related projects
166
152
167
153
*[generate-license](https://www.npmjs.com/package/generate-license): Generate a license file for a GitHub project. | [homepage](https://github.com/generate/generate-license"Generate a license file for a GitHub project.")
@@ -170,7 +156,7 @@ Visit Generate's [documentation for tasks](https://github.com/generate/generate/
170
156
171
157
### Community
172
158
173
-
Are you using [Generate](https://github.com/generate/generate) in your project? Have you published a [generator](https://github.com/generate/generate/blob/master/docs/){generators.md} and want to share your project with the world?
159
+
Are you using [Generate](https://github.com/generate/generate) in your project? Have you published a [generator](https://github.com/generate/generate/blob/master/docs/generators.md) and want to share your project with the world?
174
160
175
161
Here are some suggestions!
176
162
@@ -186,24 +172,24 @@ Pull requests and stars are always welcome. For bugs and feature requests, [plea
186
172
187
173
### Running tests
188
174
189
-
Install dev dependencies:
175
+
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
0 commit comments