UNPKG

@nestjsplus/lib-starter

Version:

Boilerplate for building installable NestJS libraries

18 lines (17 loc) 823 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@angular-devkit/core"); const schematics_1 = require("@angular-devkit/schematics"); const utils_1 = require("../../schematics-utils/utils"); function main(options) { const testModuleOptions = Object.assign({}, options); testModuleOptions.name = core_1.strings.dasherize(options.name.toLowerCase() + '-test'); testModuleOptions.path = core_1.join(options.sourceRoot, testModuleOptions.name); return (tree, context) => { return schematics_1.chain([ schematics_1.mergeWith(utils_1.generateFilesFromTemplates(testModuleOptions, './files/test-client', testModuleOptions.path)), utils_1.addRootModuleImportAndMetadata(testModuleOptions), ]); }; } exports.main = main;