named-base.js 558 B

1234567891011121314151617181920
  1. var util = require('util');
  2. var Base = require('./base');
  3. /**
  4. * The `NamedBase` object is only dealing with one argument: `name`.
  5. *
  6. * You can use it whenever you need at least one **required** positional
  7. * argument for your generator (which is a fairly common use case).
  8. *
  9. * @param {String|Array} args [description]
  10. * @param {Object} options [description]
  11. */
  12. function NamedBase(args, options) {
  13. Base.apply(this, arguments);
  14. this.argument('name', { type: String, required: true });
  15. }
  16. util.inherits(NamedBase, Base);
  17. module.exports = NamedBase;