Skip to content
A Yeoman composable generator to scaffold out default app files for other generators
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
generators/app
test
.editorconfig
.gitattributes
.gitignore
.jshintrc
.travis.yml
LICENSE
README.md
package.json

README.md

generator-common Build Status

A Yeoman composable generator to scaffold out default app files for other generators

Usage

In the generator that would like to use this one, add the following code in a method that is in yeoman.generators.Base.extend:

  this.composeWith('common', {
    options: {}
  });

Using options:

  this.composeWith('common', {
    options: {
      'skip-messages': true,
      jshintrc: false,
      gitignore: false,
      editorconfig: true,
      gitattributes: true,
      'test-jshintrc': false
    }
  });

Example generator:

var yeoman = require('yeoman-generator');
module.exports = yeoman.generators.Base.extend({
  setupRoot: function () {
    this.composeWith('common', {
      options: {
        'skip-messages': true,
        jshintrc: false,
        gitignore: false,
        editorconfig: true,
        gitattributes: true,
        'test-jshintrc': true
      }
    });
  },

  doOtherThings: function () {
    this.copy('app');
  }
});

Options

skip-messages

Default: false Display the usage messages. Set to false for quieter output


editorconfig

Default: true

Set to true to create a .editorconfig file or false to skip it

gitattributes

Default: true

Set to true to create a .gitattributes file or false to skip it

gitignore

Default: true

Set to true to create a .gitignore file or false to skip it

jshintrc

Default: true

Set to true to create a .jshintrc file or false to skip it

test-jshintrc

Default: true

Set to true to create a test folder and a .jshintrc file in that folder. False does not create the folder or file

You can’t perform that action at this time.