<file_sep># generator-rrr [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
> react redux router

## Installation

First, install [Yeoman](http://yeoman.io) and generator-rrr using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).

```bash
npm install -g yo
npm install -g generator-rrr
```

Then generate your new project:

```bash
yo rrr
```

## Getting To Know Yeoman

Yeoman has a heart of gold. He&#39;s a person with feelings and opinions, but he&#39;s very easy to work with. If you think he&#39;s too opinionated, he can be easily convinced. Feel free to [learn more about him](http://yeoman.io/).

## License

Apache-2.0 © [<NAME>](http://kkpoon.github.io)


[npm-image]: https://badge.fury.io/js/generator-rrr.svg
[npm-url]: https://npmjs.org/package/generator-rrr
[travis-image]: https://travis-ci.org/kkpoon/generator-rrr.svg?branch=master
[travis-url]: https://travis-ci.org/kkpoon/generator-rrr
[daviddm-image]: https://david-dm.org/kkpoon/generator-rrr.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/kkpoon/generator-rrr
[coveralls-image]: https://coveralls.io/repos/kkpoon/generator-rrr/badge.svg
[coveralls-url]: https://coveralls.io/r/kkpoon/generator-rrr
<file_sep>'use strict';
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');

module.exports = yeoman.generators.Base.extend({
  prompting: function () {
    var done = this.async();

    // Have Yeoman greet the user.
    this.log(yosay(
      'Welcome to the stellar ' + chalk.red('generator-rrr') + ' generator!'
    ));

    var prompts = [
      {
        type: 'list',
        name: 'progLang',
        message: 'Which programming language you would use in this project?',
        choices: ["ES6", "TypeScript", "CoffeeScript"],
        default: "ES6"
      },
      {
        type: "confirm",
        name: "useFlowType",
        message: "Do you use flowtype?",
        default: true,
        when: function(answers) {
          return answers.progLang === "ES6";
        }
      }
    ];

    this.prompt(prompts, function (props) {
      this.props = props;
      // To access props later use this.props.someOption;

      done();
    }.bind(this));
  },

  writing: function () {
    this.config.set("progLang", this.props.progLang);
    this.fs.copy(
      this.templatePath('dummyfile.txt'),
      this.destinationPath('dummyfile.txt')
    );
  },

  install: function () {
    this.installDependencies();
  }
});
