You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
2.4 KiB

import { TargetConfiguration, Tree } from '@nx/devkit';
import { type ConfigurationSchema } from '../generators/configuration/schema';
import { type Framework } from '../generators/init/schema';
export type Target = 'build' | 'serve';
export type TargetFlags = Partial<Record<Target, boolean>>;
export type UserProvidedTargetName = Partial<Record<Target, string>>;
export type ValidFoundTargetName = Partial<Record<Target, string>>;
export declare function findExistingTargetsInProject(targets: {
[targetName: string]: TargetConfiguration;
}, userProvidedTargets?: UserProvidedTargetName): {
validFoundTargetName: ValidFoundTargetName;
projectContainsUnsupportedExecutor: boolean;
userProvidedTargetIsUnsupported: TargetFlags;
alreadyHasNxRspackTargets: TargetFlags;
};
export declare function addOrChangeBuildTarget(tree: Tree, options: ConfigurationSchema, target: string): void;
export declare function addOrChangeServeTarget(tree: Tree, options: ConfigurationSchema, target: string): void;
export declare function writeRspackConfigFile(tree: Tree, options: ConfigurationSchema, stylePreprocessorOptions?: {
includePaths?: string[];
}): void;
export declare function deleteWebpackConfig(tree: Tree, projectRoot: string, webpackConfigFilePath?: string): void;
export declare function moveAndEditIndexHtml(tree: Tree, options: ConfigurationSchema, buildTarget: string): void;
export declare function normalizeViteConfigFilePathWithTree(tree: Tree, projectRoot: string, configFile?: string): string;
export declare function getViteConfigPathForProject(tree: Tree, projectName: string, target?: string): string;
export declare function handleUnsupportedUserProvidedTargets(userProvidedTargetIsUnsupported: TargetFlags, userProvidedTargetName: UserProvidedTargetName, validFoundTargetName: ValidFoundTargetName, framework: Framework): Promise<void>;
export declare function handleUnknownExecutors(projectName: string): Promise<void>;
export declare function determineFrameworkAndTarget(tree: Tree, options: ConfigurationSchema, projectRoot: string, targets: {
[targetName: string]: TargetConfiguration<any>;
}): {
target: 'node' | 'web';
framework?: Framework;
};
export declare function determineMain(tree: Tree, options: ConfigurationSchema): string;
export declare function determineTsConfig(tree: Tree, options: ConfigurationSchema): string;
//# sourceMappingURL=generator-utils.d.ts.map