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

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

Generate a new consolidate-style engine project, with starter code and unit tests.
https://github.com/generate/generate-engine

Last synced: 11 months ago
JSON representation

Generate a new consolidate-style engine project, with starter code and unit tests.

Awesome Lists containing this project

README

          




Generate a new consolidate-style engine project, with starter code and unit tests.

# generate-engine

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

![generate-engine demo](https://raw.githubusercontent.com/generate/generate-engine/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)
* [default](#default)
* [minimal](#minimal)
* [index](#index)
* [test](#test)
- [Generated files](#generated-files)
* [default](#default-1)
* [index](#index-1)
* [minimal](#minimal-1)
* [test](#test-1)
- [Source files](#source-files)
* [default](#default-2)
* [index](#index-2)
* [minimal](#minimal-2)
* [test](#test-2)
- [Next steps](#next-steps)
* [Running unit tests](#running-unit-tests)
* [Publishing your project](#publishing-your-project)
- [About](#about)
* [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 `engine` 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-engine**

Install this module with the following command:

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

### Usage

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

```sh
$ gen engine
```

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

### [default](generator.js#L54)

Scaffold out the [necessary files](#default-1) for a [consolidate](https://github.com/visionmedia/consolidate.js)-style engine project.

**Example**

```sh
$ gen engine
```

### [minimal](generator.js#L69)

Scaffold out a [minimal](#minimal-1) engine project.

**Example**

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

### [index](generator.js#L83)

Write only the `index.js` file with starter code for creating a [consolidate](https://github.com/visionmedia/consolidate.js)-style engine to the current working directory.

**Example**

```sh
$ gen engine:index
```

### [test](generator.js#L95)

Write only [test files](#test-1) with [mocha](https://github.com/mochajs/mocha)-style unit tests for your engine.

**Example**

```sh
$ gen engine:test
```

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

## Generated files

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

_(diffs are base on the files generated by the `default` task)_

### default

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

```diff
.
├─┬ test
│ ├─┬ fixtures
│ │ ├── content.tmpl
│ │ ├── default.tmpl
│ │ └── nothing.tmpl
│ └── test.js
├── .editorconfig
├── .eslintrc.json
├── .gitattributes
├── .gitignore
├── .travis.yml
├── index.js
├── contributing.md
├── LICENSE
├── package.json
└── README.md
```

### index

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

```diff
.
-├─┬ test
-│ ├─┬ fixtures
-│ │ ├── content.tmpl
-│ │ ├── default.tmpl
-│ │ └── nothing.tmpl
-│ └── test.js
-├── .editorconfig
-├── .eslintrc.json
-├── .gitattributes
-├── .gitignore
-├── .travis.yml
└── index.js
-├── contributing.md
-├── LICENSE
-├── package.json
-└── README.md
```

### minimal

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

```diff
.
-├─┬ test
-│ ├─┬ fixtures
-│ │ ├── content.tmpl
-│ │ ├── default.tmpl
-│ │ └── nothing.tmpl
-│ └── test.js
-├── .editorconfig
-├── .eslintrc.json
-├── .gitattributes
├── .gitignore
-├── .travis.yml
├── index.js
-├── contributing.md
├── LICENSE
├── package.json
└── README.md
```

### test

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

```diff
.
└─┬ test
├─┬ fixtures
│ ├── content.tmpl
│ ├── default.tmpl
│ └── nothing.tmpl
└── test.js
-├── .editorconfig
-├── .eslintrc.json
-├── .gitattributes
-├── .gitignore
-├── .travis.yml
-├── index.js
-├── contributing.md
-├── LICENSE
-├── package.json
-└── README.md
```

## Source files

The following trees represent the source files or templates that are used by each task. This shows how "micro-generators" are used as dependencies for generating a single file.

### default

Source files used by the [default task](#default):

```diff
.
├─┬ templates
│ ├─┬ fixtures
│ │ ├── content.tmpl
│ │ ├── default.tmpl
│ │ └── nothing.tmpl
│ ├── test.js
│ └── index.js
└─┬ node_modules
├─┬ generate-editorconfig
│ └─┬ templates
│ └── .editorconfig
├─┬ generate-eslint
│ └─┬ templates
│ └── .eslintrc.json
├─┬ generate-gitattributes
│ └─┬ templates
│ └── .gitattributes
├─┬ generate-gitignore
│ └─┬ templates
│ └── .gitignore
├─┬ generate-travis
│ └─┬ templates
│ └── .travis.yml
├─┬ generate-contributing
│ └─┬ templates
│ └── contributing.md
├─┬ generate-license
│ └─┬ templates
│ └── mit.tmpl
├─┬ generate-package
│ └─┬ templates
│ └── package.json
└─┬ generate-readme
└─┬ templates
└── node.md
```

### index

Source files used by the [index task](#index):

```diff
.
└─┬ templates
└── index.js
```

### minimal

Source files used by the [minimal task](#minimal):

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

### test

Source files used by the [test task](#test):

```diff
.
└─┬ templates
├─┬ fixtures
│ ├── content.tmpl
│ ├── default.tmpl
│ └── nothing.tmpl
└── test.js
```

## 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

### 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-engine`
* 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](https://github.com/generate/generate-engine/blob/master/LICENSE).

***

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