UNPKG

@nx-plugins/testing-library

Version:

The Nx Plugin for Testing Library that contains executors and generators for allowing your workspace to use powerful Testing Library testing capabilities.

14 lines 746 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createFiles = void 0; const devkit_1 = require("@nrwl/devkit"); const path_1 = require("path"); function createFiles(host, options) { const componentDir = (0, devkit_1.joinPathFragments)(options.projectSourceRoot, options.directory); (0, devkit_1.generateFiles)(host, (0, devkit_1.joinPathFragments)(__dirname, '../files'), componentDir, Object.assign(Object.assign({}, options), { tmpl: '' })); if (options.js) { host.rename((0, path_1.join)(componentDir, `${options.fileName}.tsx`), (0, path_1.join)(componentDir, `${options.fileName}.jsx`)); } } exports.createFiles = createFiles; //# sourceMappingURL=create-files.js.map