constructor()

in generators/app/index.js [31:61]


    constructor(args, opts) {
        super(args, opts);
        this.description = 'Generates a Visual Studio Code extension ready for development.';

        this.argument('destination', { type: String, required: false, description: `\n    The folder to create the extension in, absolute or relative to the current working directory.\n    Use '.' for the current folder. If not provided, defaults to a folder with the extension display name.\n  ` })

        this.option('insiders', { type: Boolean, alias: 'i', description: 'Show the insiders options for the generator' });
        this.option('quick', { type: Boolean, alias: 'q', description: 'Quick mode, skip all optional prompts and use defaults' });
        this.option('open', { type: Boolean, alias: 'o', description: 'Open the generated extension in Visual Studio Code' });
        this.option('openInInsiders', { type: Boolean, alias: 'O', description: 'Open the generated extension in Visual Studio Code Insiders' });

        this.option('extensionType', { type: String, alias: 't', description: extensionGenerators.slice(0, 6).map(e => e.aliases[0]).join(', ') + '...' });
        this.option('extensionDisplayName', { type: String, alias: 'n', description: 'Display name of the extension' });
        this.option('extensionId', { type: String, description: 'Id of the extension' });
        this.option('extensionDescription', { type: String, description: 'Description of the extension' });

        this.option('pkgManager', { type: String, description: `'npm' or 'yarn'` });
        this.option('webpack', { type: Boolean, description: `Bundle the extension with webpack` });
        this.option('gitInit', { type: Boolean, description: `Initialize a git repo` });

        this.option('snippetFolder', { type: String, description: `Snippet folder location` });
        this.option('snippetLanguage', { type: String, description: `Snippet language` });

        this.extensionConfig = Object.create(null);
        this.extensionConfig.installDependencies = false;
        this.extensionConfig.insiders = false;

        this.extensionGenerator = undefined;

        this.abort = false;
    }