igniteui-angular
Version:
Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps
32 lines (31 loc) • 1.78 kB
TypeScript
import { workspaces } from '@angular-devkit/core';
import type { SchematicContext, Rule, Tree } from '@angular-devkit/schematics';
import type { Options } from '../interfaces/options';
export declare enum PackageTarget {
DEV = "devDependencies",
REGULAR = "dependencies",
NONE = "none"
}
export interface PackageEntry {
name: string;
target: PackageTarget;
}
/**
* Dependencies are explicitly defined here, so we avoid adding
* unnecessary packages to the consuming project's deps
*/
export declare const DEPENDENCIES_MAP: PackageEntry[];
export declare const getWorkspacePath: (host: Tree) => string;
export declare const getConfigFile: (project: workspaces.ProjectDefinition, option: string, context: SchematicContext, configSection?: string) => string;
export declare const overwriteJsonFile: (tree: Tree, targetFile: string, data: any) => void;
export declare const logSuccess: (options: Options) => Rule;
export declare const addDependencies: (options: Options) => (tree: Tree, context: SchematicContext) => Promise<void>;
/** Checks whether a property exists in the angular workspace. */
export declare const propertyExistsInWorkspace: (targetProp: string, workspace: workspaces.WorkspaceDefinition) => boolean;
/** Recursively search for the first property that matches targetProp within a json file. */
export declare const getPropertyFromWorkspace: (targetProp: string, workspace: any, curKey?: string) => {
key: string;
value: any;
};
export declare const includeStylePreprocessorOptions: (workspaceHost: workspaces.WorkspaceHost, workspace: workspaces.WorkspaceDefinition, context: SchematicContext, tree: Tree) => Promise<void>;
export declare const addPackageToPkgJson: (tree: Tree, pkg: string, version: string, target: string) => boolean;