@lightweightform/theme-common
Version:
Common utilities for Lightweightform themes
20 lines (19 loc) • 1.01 kB
TypeScript
import { Path, workspaces } from '@angular-devkit/core';
import { Tree } from '@angular-devkit/schematics';
/**
* Gets a style file with the given extension in a project and returns its path.
* If no extension is specified, any style file with a valid extension will be
* returned.
* @param project Project for which to fetch the style file.
* @param extension Expected style file extension.
* @returns Path of the project's style file.
*/
export declare function getProjectStyleFilePath(project: workspaces.ProjectDefinition, extension?: string): Path | null;
/**
* Adds a style path to a project's build or test target.
* @param host Source tree.
* @param projectName Name of the project where to add the style path.
* @param targetName Target on which to add the style path.
* @param stylePath Path of the style file to add.
*/
export declare function addStylePathToProjectTarget(host: Tree, projectName: string, targetName: 'build' | 'test', stylePath: Path): Promise<void>;