generator-common

0.2.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i generator-common

Weekly Downloads

1

Version

0.2.0

License

MIT

Last publish

Collaborators

  • eddiemonge