UNPKG

@nstudio/angular

Version:

Angular Plugin for xplat

28 lines (27 loc) 2.11 kB
import { Tree, Rule } from '@angular-devkit/schematics'; import { XplatFeatureHelpers } from '@nstudio/xplat'; import { PlatformTypes } from '@nstudio/xplat-utils'; export type IGenerateType = 'component' | 'directive' | 'pipe' | 'service' | 'state'; export interface IGenerateOptions { name: string; feature?: string; subFolder?: string; projects?: string; needsIndex?: boolean; root?: boolean; skipFormat?: boolean; } export declare function generate(type: IGenerateType, options: any): Rule; export declare function getFeatureName(options: IGenerateOptions): string; export declare function getNxFeaturePath(tree: Tree, featureName: string): any; export declare function addToFeature(xplatFolderName: string, type: IGenerateType, options: IGenerateOptions, prefixPath: string, tree: Tree, extra?: string, forSubFolder?: boolean): Rule; export declare function isFeatureInGeneralBarrel(featureName: string): featureName is "shared" | "ui"; export declare function shouldTargetCoreBarrel(type: IGenerateType, featureName: string): boolean; export declare function adjustBarrel(type: IGenerateType, options: IGenerateOptions, prefix: string): Rule; export declare function adjustBarrelIndex(type: IGenerateType, options: IGenerateOptions, indexFilePath: string, inSubFolder?: boolean, isBase?: boolean, importIfSubFolder?: boolean): Rule; export declare function adjustBarrelIndexForType(type: IGenerateType, options: IGenerateOptions, indexFilePath: string): Rule; export declare function adjustModule(tree: Tree, type: IGenerateType, options: IGenerateOptions, prefixPath: string): Rule; export declare function adjustFeatureModule(type: IGenerateType, options: IGenerateOptions, modulePath: string): Rule; export declare function adjustFeatureModuleForState(options: IGenerateOptions, modulePath: string): Rule; export declare function adjustRouting(options: XplatFeatureHelpers.Schema, routingModulePaths: Array<string>, platform: string): Rule; export declare function adjustSandbox(options: XplatFeatureHelpers.Schema, platform: PlatformTypes, appDirectory: string): Rule;