UNPKG

salesforcedx-templates

Version:

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

19 lines 957 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = require("path"); // tslint:disable-next-line:no-var-requires const generator = require('yeoman-generator'); class VisualforcePageGenerator extends generator { constructor(args, options) { super(args, options); this.sourceRoot(path.join(__dirname, '..', 'templates', 'visualforcepage')); this.conflicter.force = false; } writing() { const { template, outputdir, label, apiversion, pagename } = this.options; this.fs.copyTpl(this.templatePath(`${template}.page`), this.destinationPath(path.join(outputdir, `${pagename}.page`))); this.fs.copyTpl(this.templatePath('_page.page-meta.xml'), this.destinationPath(path.join(outputdir, `${pagename}.page-meta.xml`)), { vfLabel: label, apiVersion: apiversion }); } } exports.default = VisualforcePageGenerator; //# sourceMappingURL=visualforcePageGenerator.js.map