How to use the yeoman-generator.apply function in yeoman-generator

To help you get started, we’ve selected a few yeoman-generator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IBM-Swift / generator-swiftserver / app / index.js View on Github external
constructor: function () {
    Generator.apply(this, arguments)
    // Allow the user to pass the application name into the generator directly
    this.argument('name', {
      desc: 'Name of the application to scaffold.',
      required: false,
      type: String
    })

    this.option('init', {
      type: Boolean,
      desc: 'Generate basic default scaffold without prompting user for input.',
      defaults: false
    })

    this.option('skip-build', {
      type: Boolean,
      desc: 'Skip building the generated application',
github jhipster / generator-jhipster / generators / docker / openshift / index.js View on Github external
constructor: function (...args) { // eslint-disable-line object-shorthand
        generator.apply(this, args);

        // This adds support for a `--skip-checks` flag
        this.option('skip-checks', {
            desc: 'Check the status of the required tools',
            type: Boolean,
            defaults: false
        });

        this.skipChecks = this.options['skip-checks'];
    },
github jhipster / generator-jhipster / generators / docker / rancher-compose / index.js View on Github external
constructor: function (...args) { // eslint-disable-line object-shorthand
        generators.apply(this, args);

        // This adds support for a `--skip-checks` flag
        this.option('skip-checks', {
            desc: 'Check the status of the required tools',
            type: Boolean,
            defaults: false
        });

        this.skipChecks = this.options['skip-checks'];
    },
github IBM-Swift / generator-swiftserver / refresh / index.js View on Github external
constructor: function () {
    Generator.apply(this, arguments)
    // Allow the user to specify where the specification file is
    this.option('specfile', {
      desc: 'The location of the specification file.',
      required: false,
      hide: true,
      type: String
    })

    this.option('spec', {
      desc: 'The specification in a JSON format.',
      required: false,
      hide: true,
      type: String
    })

    this.fs.copyHbs = (from, to, params) => {
github bastienmichaux / generator-jhipster-db-helper / generators / fix-entity / index.js View on Github external
constructor: function (...args) { // eslint-disable-line object-shorthand
        generator.apply(this, args);

        // Option used to make unit tests in temporary directories instead of the current directory.
        // The passed string argument references constants,
        // those constants can be found in test/test-constants.js.
        this.option('dbhTestCase', {
            desc: 'Test case for this module\'s npm test',
            type: String,
            defaults: ''
        });

        this.dbhTestCase = this.options.dbhTestCase;

        // All information from entity generator
        this.entityConfig = this.options.entityConfig;
        this.entityTableName = this.options.entityConfig.entityTableName;
        this.entityClass = this.options.entityConfig.entityClass;
github mean-expert-official / fireloop.io / fireloop-cli / generator-fireloop / src / setup / index.ts View on Github external
constructor: function() {
    // Calling the super constructor is important so our generator is correctly set up
    generators.apply(this, arguments);
    this.log(chalk.yellow('Let\'s setup up the FireLoop Modules.'));
  },
  // Configure Component
github abbas-oveissi / generator-helma-mvp / generators / fragment / index.js View on Github external
constructor: function (...args)
{
  generator.apply(this, args);

  this.configOptions = {};
  // This adds support for a `--nav-support` flag


}
,
github jhipster / generator-jhipster / generators / docker / kubernetes / index.js View on Github external
constructor: function (...args) { // eslint-disable-line object-shorthand
        generator.apply(this, args);

        // This adds support for a `--skip-checks` flag
        this.option('skip-checks', {
            desc: 'Check the status of the required tools',
            type: Boolean,
            defaults: false
        });

        this.skipChecks = this.options['skip-checks'];
    },
github bezoerb / generator-sf / generators / buildtool / _common / index.js View on Github external
constructor: function () {
    Generator.apply(this, arguments);

    this.option('preprocessor', {
      type: String,
      desc: 'Use css preprocessor'
    });

    this.option('libsass', {
      type: Boolean,
      desc: 'Use libsass'
    });

    this.option('loader', {
      type: String,
      desc: 'Use js loader'
    });
github ousmanedev / generator-mage2 / module-base.js View on Github external
constructor: function(args, opts) {
    Generator.apply(this, arguments);

    var createModuleMessage = 'Use `yo m2ext:module` to generate a module and use `cd` to move inside the module folder.';
    if(!this.insideModuleFolder()) {
      this.env.error('You must be located inside a Magento 2 module folder to run this gnerator.\n' + createModuleMessage);
    }

    if(!this.canGetModuleName()) {
      this.env.error('Failed to get your module name from the files.\n' + createModuleMessage);
    }
  },