nx
Version:
125 lines (124 loc) • 3.44 kB
TypeScript
import { PackageManager } from '../utils/package-manager';
import { InputDefinition, TargetDependencyConfig } from './workspace-json-project-json';
export declare type ImplicitDependencyEntry<T = '*' | string[]> = {
[ ]: T | ImplicitJsonSubsetDependency<T>;
};
export interface ImplicitJsonSubsetDependency<T = '*' | string[]> {
[ ]: T | ImplicitJsonSubsetDependency<T>;
}
export interface NxAffectedConfig {
/**
* Default based branch used by affected commands.
*/
defaultBase?: string;
}
export declare type TargetDefaults = Record<string, {
outputs?: string[];
dependsOn?: (TargetDependencyConfig | string)[];
inputs?: (InputDefinition | string)[];
}>;
export declare type TargetDependencies = Record<string, (TargetDependencyConfig | string)[]>;
/**
* Nx.json configuration
*/
export interface NxJsonConfiguration<T = '*' | string[]> {
/**
* Optional (additional) Nx.json configuration file which becomes a base for this one
*/
extends?: string;
/**
* Map of files to projects that implicitly depend on them
*/
implicitDependencies?: ImplicitDependencyEntry<T>;
/**
* @deprecated use targetDefaults instead
* Dependencies between different target names across all projects
*/
targetDependencies?: TargetDependencies;
/**
* Named inputs targets can refer to reduce duplication
*/
namedInputs?: {
[ ]: (string | InputDefinition)[];
};
/**
* Dependencies between different target names across all projects
*/
targetDefaults?: TargetDefaults;
/**
* NPM Scope that the workspace uses
*/
npmScope?: string;
/**
* Default options for `nx affected`
*/
affected?: NxAffectedConfig;
/**
* Where new apps + libs should be placed
*/
workspaceLayout?: {
libsDir: string;
appsDir: string;
};
/**
* Available Task Runners
*/
tasksRunnerOptions?: {
[ ]: {
/**
* Path to resolve the runner
*/
runner: string;
/**
* Default options for the runner
*/
options?: any;
};
};
/**
* List of default values used by generators.
*
* These defaults are global. They are used when no other defaults are configured.
*
* Example:
*
* ```
* {
* "@nrwl/react": {
* "library": {
* "style": "scss"
* }
* }
* }
* ```
*/
generators?: {
[ ]: {
[ ]: any;
};
};
/**
* Default generator collection. It is used when no collection is provided.
*/
cli?: {
packageManager?: PackageManager;
/**
* @deprecated - defaultCollection is deprecated and will be removed
*/
defaultCollection?: string;
defaultProjectName?: string;
};
/**
* Plugins for extending the project graph
*/
plugins?: string[];
/**
* Configuration for Nx Plugins
*/
pluginsConfig?: Record<string, unknown>;
/**
* Default project. When project isn't provided, the default project
* will be used. Convenient for small workspaces with one main application.
*/
defaultProject?: string;
}