An open API service indexing awesome lists of open source software.

https://github.com/generate/generate-updater

Generate an `Update` updater project.
https://github.com/generate/generate-updater

Last synced: 9 months ago
JSON representation

Generate an `Update` updater project.

Awesome Lists containing this project

README

          




Generate an [Update](https://github.com/update/update) updater project.

# generate-updater

[![NPM version](https://img.shields.io/npm/v/generate-updater.svg?style=flat)](https://www.npmjs.com/package/generate-updater) [![NPM downloads](https://img.shields.io/npm/dm/generate-updater.svg?style=flat)](https://npmjs.org/package/generate-updater) [![Build Status](https://img.shields.io/travis/generate/generate-updater.svg?style=flat)](https://travis-ci.org/generate/generate-updater)

![generate-updater demo](https://raw.githubusercontent.com/generate/generate-updater/master/docs/demo.gif)

## Table of Contents

- [What is "Generate"?](#what-is-generate)
- [Getting started](#getting-started)
* [Install](#install)
* [Usage](#usage)
* [Help](#help)
- [Tasks](#tasks)
* [updater:default](#updaterdefault)
* [updater:minimal](#updaterminimal)
* [updater:micro](#updatermicro)
* [updater:file](#updaterfile)
* [updater:rootfiles](#updaterrootfiles)
* [updater:docs](#updaterdocs)
* [updater:docs](#updaterdocs-1)
* [updater:verbfile](#updaterverbfile)
* [updater:verbmd](#updaterverbmd)
* [updater:test](#updatertest)
* [updater:templates](#updatertemplates)
- [Files trees](#files-trees)
* [Generated files](#generated-files)
+ [default](#default)
+ [minimal](#minimal)
+ [updater](#updater)
+ [rootfiles](#rootfiles)
+ [dotfiles](#dotfiles)
* [Source files](#source-files)
+ [default](#default-1)
+ [minimal](#minimal-1)
+ [updater](#updater-1)
+ [rootfiles](#rootfiles-1)
+ [dotfiles](#dotfiles-1)
- [Next steps](#next-steps)
* [Running unit tests](#running-unit-tests)
* [Publishing your project](#publishing-your-project)
- [About](#about)
* [Related projects](#related-projects)
* [Community](#community)
* [Contributing](#contributing)
* [Running tests](#running-tests)
* [Author](#author)
* [License](#license)

_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_

## What is "Generate"?

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).

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.

**For more information**:

* Visit the [generate project](https://github.com/generate/generate/)
* Visit the [generate documentation](https://github.com/generate/generate/blob/master/docs/)
* 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))

## Getting started

### Install

**Installing the CLI**

To run the `updater` 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:

```sh
$ npm install --global generate
```

This adds the `gen` command to your system path, allowing it to be run from any directory.

**Install generate-updater**

Install this module with the following command:

```sh
$ npm install --global generate-updater
```

### Usage

Run this generator's `default` [task](https://github.com/generate/generate/blob/master/docs/tasks.md#default) with the following command:

```sh
$ gen updater
```

**What you should see in the terminal**

If completed successfully, you should see both `starting` and `finished` events in the terminal, like the following:

```sh
[00:44:21] starting ...
...
[00:44:22] finished ✔
```

If you do not see one or both of those events, please [let us know about it](../../issues).

### Help

To see a general help menu and available commands for Generate's CLI, run:

```sh
$ gen help
```

## Tasks

All available tasks.

### [updater:default](generator.js#L40)

Scaffold out an [update](https://github.com/update/update) updater project. Alias for the [updater](#updater) task, to allow running the updater with the following command:

**Example**

```sh
$ gen updater
```

### [updater:minimal](generator.js#L62)

Scaffold out a minimal [Update](https://github.com/update/update) updater project.

**Example**

```sh
$ gen updater:min
# or
$ gen updater:minimal
```

### [updater:micro](generator.js#L82)

Scaffold out a project for a [Update](https://github.com/update/update) micro-updater.

**Example**

```sh
$ gen updater:micro
```

### [updater:file](generator.js#L102)

Write a `updater.js` file to the current working directory.

**Example**

```sh
$ gen updater:file
```

### [updater:rootfiles](generator.js#L125)

Generate the LICENSE, package.json and README.md files for an updater project.

**Example**

```sh
$ gen updater:rootfiles
```

### [updater:docs](generator.js#L141)

Adds files tree docs to the `docs` directory.

**Example**

```sh
$ gen updater:docs
```

### [updater:docs](generator.js#L153)

Adds files tree docs to the `docs` directory.

**Example**

```sh
$ gen updater:docs
```

### [updater:verbfile](generator.js#L165)

Add a `verbfile.js` to the current working directory.

**Example**

```sh
$ gen updater:verbfile
```

### [updater:verbmd](generator.js#L177)

Add a `.verb.md` readme template to the current working directory.

**Example**

```sh
$ gen updater:verbmd
```

### [updater:test](generator.js#L190)

Create a `test.js` file in the `test` directory, with unit tests for all of the tasks in the generated updater.

**Example**

```sh
$ gen updater:test
```

### [updater:templates](generator.js#L207)

Generate files in the updater's `templates` directory.

**Example**

```sh
$ gen updater:templates
```

Visit Generate's [documentation for tasks](https://github.com/generate/generate/blob/master/docs/tasks.md).

## Files trees

The following files trees are automatically generated by a task in [verbfile.js](verbfile.js).

* [generated files](#generated-files): trees representing the actual generated "dest" files for each task
* [source files](#source-files): trees representing the source files and templates used by each task

_(See Generate's [customization docs ](https://github.com/generate/generate/blob/master/docs/customization.md) to learn how to override individual templates.)_

### Generated files

Files generated by each task (e.g. `dest` files). See the Generate [customization docs ](https://github.com/generate/generate/blob/master/docs/customization.md) to learn how to override individual templates.

Note that diffs are base on comparisons against the files generated by the `default` task. Additionally, some tasks generate the same files, but with different contents (for example, the contents of `index.js` differs based on the task).

#### default

Files generated by the [default task](#default):

```diff
.
├─┬ test
│ ├─┬ fixtures
│ │ └── temp.txt
│ ├── plugin.js
│ └── test.js
├── .editorconfig
├── .eslintrc.json
├── .gitattributes
├── .gitignore
├── .travis.yml
├── updatefile.js
├── index.js
├── LICENSE
├── package.json
├── README.md
└── .verb.md
```

#### minimal

Files generated by the [minimal task](#minimal):

```diff
.
-├─┬ test
-│ ├─┬ fixtures
-│ │ └── temp.txt
-│ ├── plugin.js
-│ └── test.js
-├── .editorconfig
-├── .eslintrc.json
-├── .gitattributes
├── .gitignore
-├── .travis.yml
├── updatefile.js
├── index.js
├── LICENSE
├── package.json
└── README.md
-└── .verb.md
```

#### updater

Files generated by the [updater task](#updater):

```diff
.
├─┬ test
│ ├─┬ fixtures
│ │ └── temp.txt
│ ├── plugin.js
│ └── test.js
├── .editorconfig
├── .eslintrc.json
├── .gitattributes
├── .gitignore
├── .travis.yml
├── updatefile.js
├── index.js
├── LICENSE
├── package.json
├── README.md
└── .verb.md
```

#### rootfiles

Files generated by the [rootfiles task](#rootfiles):

```diff
.
-├─┬ test
-│ ├─┬ fixtures
-│ │ └── temp.txt
-│ ├── plugin.js
-│ └── test.js
-├── .editorconfig
-├── .eslintrc.json
-├── .gitattributes
-├── .gitignore
-├── .travis.yml
-├── updatefile.js
-├── index.js
├── LICENSE
├── package.json
└── README.md
-└── .verb.md
```

#### dotfiles

Files generated by the [dotfiles task](#dotfiles):

```diff
.
-├─┬ test
-│ ├─┬ fixtures
-│ │ └── temp.txt
-│ ├── plugin.js
-│ └── test.js
├── .editorconfig
├── .eslintrc.json
├── .gitattributes
├── .gitignore
└── .travis.yml
-├── updatefile.js
-├── index.js
-├── LICENSE
-├── package.json
-├── README.md
-└── .verb.md
```

### Source files

The following trees represent the source files or templates that are used by each task. You'll see that most of the tasks use at least one "micro-generator" to generate a specific file.

#### default

Source files and/or libraries used by the [default task](#default):

```diff
.
├─┬ templates
│ ├─┬ tests
│ │ ├─┬ fixtures
│ │ │ └── temp.md
│ │ ├── plugin.js
│ │ └── test.js
│ ├── updatefile.js
│ ├── index.js
│ └── _verb.md
└─┬ node_modules
├─┬ generate-editorconfig
│ └─┬ templates
│ └── _editorconfig
├─┬ generate-eslint
│ └─┬ templates
│ └── _eslintrc.json
├─┬ generate-gitattributes
│ └─┬ templates
│ └── _gitattributes
├─┬ generate-project
│ └─┬ node_modules
│ └─┬ generate-gitignore
│ └─┬ templates
│ └── Minimal.gitignore
├─┬ generate-travis
│ └─┬ templates
│ └── _travis.yml
├─┬ generate-license
│ └─┬ templates
│ └── mit.tmpl
├─┬ generate-package
│ └─┬ templates
│ └── $package.json
└─┬ generate-readme
└─┬ templates
└── node.md
```

#### minimal

Source files and/or libraries used by the [minimal task](#minimal):

```diff
.
├─┬ node_modules
│ ├─┬ generate-project
│ │ └─┬ node_modules
│ │ └─┬ generate-gitignore
│ │ └─┬ templates
│ │ └── Node.gitignore
│ ├─┬ generate-license
│ │ └─┬ templates
│ │ └── mit.tmpl
│ ├─┬ generate-package
│ │ └─┬ templates
│ │ └── $package.json
│ └─┬ generate-readme
│ └─┬ templates
│ └── node.md
└─┬ templates
├── updatefile.js
└── index.js
```

#### updater

Source files and/or libraries used by the [updater task](#updater):

```diff
.
├─┬ templates
│ ├─┬ tests
│ │ ├─┬ fixtures
│ │ │ └── temp.md
│ │ ├── plugin.js
│ │ └── test.js
│ ├── updatefile.js
│ ├── index.js
│ └── _verb.md
└─┬ node_modules
├─┬ generate-editorconfig
│ └─┬ templates
│ └── _editorconfig
├─┬ generate-eslint
│ └─┬ templates
│ └── _eslintrc.json
├─┬ generate-gitattributes
│ └─┬ templates
│ └── _gitattributes
├─┬ generate-project
│ └─┬ node_modules
│ └─┬ generate-gitignore
│ └─┬ templates
│ └── Minimal.gitignore
├─┬ generate-travis
│ └─┬ templates
│ └── _travis.yml
├─┬ generate-license
│ └─┬ templates
│ └── mit.tmpl
├─┬ generate-package
│ └─┬ templates
│ └── $package.json
└─┬ generate-readme
└─┬ templates
└── node.md
```

#### rootfiles

Source files and/or libraries used by the [rootfiles task](#rootfiles):

```diff
.
└─┬ node_modules
├─┬ generate-license
│ └─┬ templates
│ └── mit.tmpl
├─┬ generate-package
│ └─┬ templates
│ └── $package.json
└─┬ generate-readme
└─┬ templates
└── node.md
```

#### dotfiles

Source files and/or libraries used by the [dotfiles task](#dotfiles):

```diff
.
└─┬ node_modules
├─┬ generate-editorconfig
│ └─┬ templates
│ └── _editorconfig
├─┬ generate-eslint
│ └─┬ templates
│ └── _eslintrc.json
├─┬ generate-gitattributes
│ └─┬ templates
│ └── _gitattributes
├─┬ generate-project
│ └─┬ node_modules
│ └─┬ generate-gitignore
│ └─┬ templates
│ └── Minimal.gitignore
└─┬ generate-travis
└─┬ templates
└── _travis.yml
```

## Next steps

### Running unit tests

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:

```sh
$ npm install && test
```

### Publishing your project

If you're tests are passing and you're ready to publish your project to [npm](https://www.npmjs.com), you can do that now with the following command:

**Are you sure you're ready?!**

```sh
$ npm publish
```

## About

### Related projects

[generate](https://www.npmjs.com/package/generate): Command line tool and developer framework for scaffolding out new GitHub projects. Generate offers the… [more](https://github.com/generate/generate) | [homepage](https://github.com/generate/generate "Command line tool and developer framework for scaffolding out new GitHub projects. Generate offers the robustness and configurability of Yeoman, the expressiveness and simplicity of Slush, and more powerful flow control and composability than either.")

### Community

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?

Here are some suggestions!

* If you get like Generate and want to tweet about it, please feel free to mention `@generatejs` or use the `#generatejs` hashtag
* Show your love by starring [Generate](https://github.com/generate/generate) and `generate-updater`
* Get implementation help on [StackOverflow](http://stackoverflow.com/questions/tagged/generate) (please use the `generatejs` tag in questions)
* **Gitter** Discuss Generate with us on [Gitter](https://gitter.im/generate/generate)
* If you publish an generator, thank you! To make your project as discoverable as possible, please add the keyword `generategenerator` to package.json.

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Running tests

Install dev dependencies:

```sh
$ npm install -d && npm test
```

### Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

### License

Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the MIT license.

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on September 01, 2016._