UNPKG

salesforcedx-templates

Version:

Salesforce CLI scaffolding commands for different types of Force.com metadata

25 lines 1.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /* * Copyright (c) 2019, salesforce.com, inc. * All rights reserved. * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ const path = require("path"); // tslint:disable-next-line:no-var-requires const generator = require('yeoman-generator'); class VisualforceComponentGenerator extends generator { constructor(args, options) { super(args, options); this.sourceRoot(path.join(__dirname, '..', 'templates', 'visualforcecomponent')); this.conflicter.force = false; } writing() { const { template, outputdir, label, apiversion, componentname } = this.options; this.fs.copyTpl(this.templatePath(`${template}.component`), this.destinationPath(path.join(outputdir, `${componentname}.component`))), this.fs.copyTpl(this.templatePath('_component.component-meta.xml'), this.destinationPath(path.join(outputdir, `${componentname}.component-meta.xml`)), { vfLabel: label, apiVersion: apiversion }); } } exports.default = VisualforceComponentGenerator; //# sourceMappingURL=visualforceComponentGenerator.js.map