This PR fixes a couple of issues for TS solution setup: 1. Expo library should generate with correct `package.json` file (e.g. `exports` maps either to source or dist). See [spec file](https://github.com/nrwl/nx/pull/29891/files#diff-ae2eb3d10d58786c17aa21f5603043b68043faaebafaec77912f3d69ac0c5295). 2. Nest library should generate `package.json` when non-buildable. See [spec file](https://github.com/nrwl/nx/pull/29891/files#diff-368467bcd2215def98ef14aaff9dcb056a915b0a724d0eb857f3a0badef8b40a). **Notes:** - Also removed an unsupported `standaloneConfig` option from `@nx/nest:lib` generator. This was removed a long time ago in other generators. - Expo lib generator isn't crystalized when using Rollup for build. This is a separate issue and we'll handle it in another task. ## Current Behavior - Non-buildable Expo libs generate without `exports` - Buildable Expo libs fail to generate due to error - Non-buildable Nest libs do not generate `package.json` ## Expected Behavior Expo and Nest libs generate correct `package.json` files depending on whether they are build or non-buildable. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
45 lines
999 B
TypeScript
45 lines
999 B
TypeScript
import type { Linter, LinterType } from '@nx/eslint';
|
|
import type { UnitTestRunner } from '../utils';
|
|
|
|
export interface LibraryGeneratorOptions {
|
|
directory: string;
|
|
name?: string;
|
|
buildable?: boolean;
|
|
controller?: boolean;
|
|
global?: boolean;
|
|
importPath?: string;
|
|
linter?: Linter | LinterType;
|
|
publishable?: boolean;
|
|
service?: boolean;
|
|
skipFormat?: boolean;
|
|
skipTsConfig?: boolean;
|
|
strict?: boolean;
|
|
tags?: string;
|
|
target?:
|
|
| 'es5'
|
|
| 'es6'
|
|
| 'esnext'
|
|
| 'es2015'
|
|
| 'es2016'
|
|
| 'es2017'
|
|
| 'es2018'
|
|
| 'es2019'
|
|
| 'es2020'
|
|
| 'es2021';
|
|
testEnvironment?: 'jsdom' | 'node';
|
|
unitTestRunner?: UnitTestRunner;
|
|
setParserOptionsProject?: boolean;
|
|
skipPackageJson?: boolean;
|
|
simpleName?: boolean;
|
|
addPlugin?: boolean;
|
|
isUsingTsSolutionsConfig?: boolean;
|
|
}
|
|
|
|
export interface NormalizedOptions extends LibraryGeneratorOptions {
|
|
fileName: string;
|
|
parsedTags: string[];
|
|
prefix: string;
|
|
projectName: string;
|
|
projectRoot: Path;
|
|
}
|