Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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',
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'];
},
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'];
},
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) => {
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;
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
constructor: function (...args)
{
generator.apply(this, args);
this.configOptions = {};
// This adds support for a `--nav-support` flag
}
,
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'];
},
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'
});
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);
}
},