@oasisdigital/ng-doc-portal-plugin
Version:
Nx plugin for adding the ng-doc-portal system to your nx workspace
20 lines • 989 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const tslib_1 = require("tslib");
const devkit_1 = require("@nx/devkit");
const path = require("path");
const execSchematicCommand = `npm run nx workspace-generator doc-page`;
function default_1(tree, schema) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
devkit_1.logger.info(`✳️ Starting Schematic Command: ✳️ ${execSchematicCommand} ${schema.name}`);
const templatePath = path.join(__dirname, 'files');
const interfaceNames = (0, devkit_1.names)(schema.name);
const substitutions = Object.assign({ path: schema.path ? schema.path + '/' : '',
// remove __tmpl__ from file endings
tmpl: '' }, interfaceNames);
(0, devkit_1.generateFiles)(tree, templatePath, schema.directory, substitutions);
yield (0, devkit_1.formatFiles)(tree);
});
}
//# sourceMappingURL=generator.js.map