The following are the main changes in the context of the TS solution setup: - Ensure `name` in `package.json` files is set to the import path for all projects - Set `nx.name` in `package.json` files when the user provides a name different than the package name (import path) - Clean up project generators so they don't set the `nx` property in `package.json` files unless strictly needed - Fix `@nx/vue:application` generator so it creates the Nx config in a `package.json` file for e2e projects - Ensure `@types/node` is installed in `vitest` generator - Fix generated Vite config typing error (surfaced with Vite 6) - Ensure `jsonc-eslint-parser` is installed when the `@nx/dependency-checks` rule is added to the ESLint config - Misc minor alignment changes ## Current Behavior ## Expected Behavior ## Related Issue(s) Fixes #
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
import type { names } from '@nx/devkit';
|
|
import type { Linter, LinterType } from '@nx/eslint';
|
|
import type { SupportedStyles } from '../../../typings/style';
|
|
|
|
export interface Schema {
|
|
directory: string;
|
|
name?: string;
|
|
style: SupportedStyles;
|
|
skipFormat?: boolean;
|
|
tags?: string;
|
|
unitTestRunner?: 'jest' | 'vitest' | 'none';
|
|
inSourceTests?: boolean;
|
|
e2eTestRunner: 'cypress' | 'playwright' | 'none';
|
|
linter: Linter | LinterType;
|
|
classComponent?: boolean;
|
|
routing?: boolean;
|
|
skipNxJson?: boolean;
|
|
js?: boolean;
|
|
globalCss?: boolean;
|
|
strict?: boolean;
|
|
setParserOptionsProject?: boolean;
|
|
compiler?: 'babel' | 'swc';
|
|
remotes?: string[];
|
|
devServerPort?: number;
|
|
skipPackageJson?: boolean;
|
|
rootProject?: boolean;
|
|
bundler?: 'webpack' | 'vite' | 'rspack' | 'rsbuild';
|
|
minimal?: boolean;
|
|
// Internal options
|
|
addPlugin?: boolean;
|
|
nxCloudToken?: string;
|
|
useTsSolution?: boolean;
|
|
formatter?: 'prettier' | 'none';
|
|
alwaysGenerateProjectJson?: boolean; // this is needed for MF currently
|
|
}
|
|
|
|
export interface NormalizedSchema<T extends Schema = Schema> extends T {
|
|
projectName: string;
|
|
appProjectRoot: string;
|
|
e2eProjectName: string;
|
|
e2eProjectRoot: string;
|
|
importPath: string;
|
|
parsedTags: string[];
|
|
fileName: string;
|
|
styledModule: null | SupportedStyles;
|
|
hasStyles: boolean;
|
|
unitTestRunner: 'jest' | 'vitest' | 'none';
|
|
addPlugin?: boolean;
|
|
names: ReturnType<typeof names>;
|
|
isUsingTsSolutionConfig?: boolean;
|
|
}
|