UNPKG

@nx/react-native

Version:

The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: -Integration with libraries such as Jest, Detox, and Storybook. -Scaffolding for creating buildable libraries th

27 lines (26 loc) 989 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.normalizeOptions = normalizeOptions; const devkit_1 = require("@nx/devkit"); function normalizeOptions(options, appProjectRoot // app root ) { const { fileName, className } = (0, devkit_1.names)(options.name); const entryFileIos = 'src/main'; const entryFile = options.js ? 'src/main.js' : 'src/main.tsx'; /** * if options.name is "my-app" * name: "my-app", className: 'MyApp', lowerCaseName: 'myapp', displayName: 'MyApp' * if options.name is "myApp" * name: "my-app", className: 'MyApp', lowerCaseName: 'myapp', displayName: 'MyApp' */ return { name: fileName, className, lowerCaseName: className.toLowerCase(), displayName: options.displayName || className, entryFile, entryFileIos, e2eTestRunner: options.e2eTestRunner, offsetFromRoot: (0, devkit_1.offsetFromRoot)(appProjectRoot), }; }