import { Tree, SchematicContext, Rule } from '@angular-devkit/schematics'; import { IXplatSettings } from './general'; import { PlatformTypes, FrameworkTypes, PlatformWithNxTypes } from '@nstudio/xplat-utils'; export declare const packageInnerDependencies: { '@nstudio/angular': string[]; '@nstudio/electron-angular': string[]; '@nstudio/ionic-angular': string[]; '@nstudio/nativescript-angular': string[]; '@nstudio/web-angular': string[]; }; export declare namespace XplatHelpers { interface Schema { /** * Target platforms */ platforms?: string; /** * Target frameworks */ framework?: string; /** * npm scope - auto detected from nx.json but can specify your own name */ npmScope?: string; /** * The prefix to apply to generated selectors. */ prefix?: string; /** * Skip formatting */ skipFormat?: boolean; /** * Skip dependent platform files */ skipDependentPlatformFiles?: boolean; useXplat?: boolean; /** * Skip install */ skipInstall?: boolean; /** * group by name */ groupByName?: boolean; /** * testing helper */ isTesting?: boolean; } interface NgAddSchema { /** * Target platforms */ platforms?: string; /** * Target frameworks */ framework?: string; /** * The prefix to apply to generated selectors. */ prefix?: string; } interface IXplatGeneratorOptions { directory?: string; featureName?: string; projectNames?: Array; platforms: Array; } function isFeatureNxLib(featureName: string): boolean; /** * Calls ng-add _if_ the package does not already exist * Otherwise calls that schematic if desired, otherwise noop */ function addPackageWithNgAdd(packageName: string, options?: NgAddSchema, callSchematicIfAdded?: string): Rule; function getPlatformsFromOption(platformArgument?: string, required?: boolean): any[]; function getFrameworksFromOptions(frameworkArgument: string): Array; function getFrameworkChoice(frameworkArgument: string, frameworks?: Array): "angular"; function getUpdatedXplatSettings(options: Schema): IXplatSettings; /** * Returns a name with the platform. * * @example (app, web) => web-app or app-web * @param name * @param platform */ function getPlatformName(name: string, platform: PlatformWithNxTypes): string; /** * Returns xplat folder name dependent on settings. * * @example ('web', 'angular') => 'web-angular' if no default framework otherwise just 'web' * @param platform * @param framework */ function getXplatFoldername(platform: PlatformTypes, framework?: FrameworkTypes): string; function getExternalChainsForGenerator(options: Schema, generator: string, packagesToRunXplat: Array): any[]; function getExternalChainsForApplication(options: Schema, generator: string, packagesToRun: Array): any[]; function applyAppNamingConvention(options: any, platform: PlatformWithNxTypes): Rule; function getAppNamingConvention(options: any, platform: PlatformWithNxTypes): { name: string; directory: string; }; function generateLib(options: XplatHelpers.Schema, libName: string, directory?: string, testEnvironment?: 'jsdom' | 'node', framework?: string): Rule; function cleanupLib(options: XplatHelpers.Schema, libName: string, directory?: string, framework?: string): Rule; function addPlatformFiles(options: Schema, platform: string, libName: string, checkExistingFile?: string): (tree: Tree, context: SchematicContext) => Rule; function updatePackageForXplat(options: Schema, updates: { dependencies?: { [key: string]: string; }; devDependencies?: { [key: string]: string; }; }): (tree: Tree, context: SchematicContext) => import("@angular-devkit/schematics/src/tree/interface").Tree; function updatePrettierIgnore(content: string, checkExisting: string): (tree: Tree) => import("@angular-devkit/schematics/src/tree/interface").Tree; } export declare namespace XplatComponentHelpers { interface Schema { name: string; /** * Target feature. Default is 'ui' if none specified. */ feature?: string; /** * Group it in a subfolder of the target feature */ subFolder?: string; /** * Target apps */ projects?: string; /** * Only generate for specified projects and ignore shared code */ onlyProject?: boolean; /** * Target platforms */ platforms?: string; framework?: string; /** * Create a base component for maximum cross platform sharing */ createBase?: boolean; /** * Schematic processing helpers */ needsIndex?: boolean; /** * Skip formatting */ skipFormat?: boolean; /** * testing helper */ isTesting?: boolean; } function prepare(options: Schema): XplatHelpers.IXplatGeneratorOptions; } export declare namespace XplatFeatureHelpers { interface Schema { name: string; /** * Target apps */ projects?: string; /** * Target platforms */ platforms?: string; framework?: string; /** * Only generate for specified projects and ignore shared code */ onlyProject?: boolean; /** * Only generate the module and ignore default component creation */ onlyModule?: boolean; /** * Configure routing */ routing?: boolean; /** * Create base component for maximum code sharing */ createBase?: boolean; /** * Add link to route for sandbox */ adjustSandbox?: boolean; /** * Skip formatting */ skipFormat?: boolean; /** * The directory of the new feature */ directory?: string; /** * testing helper */ isTesting?: boolean; } function prepare(options: Schema): XplatHelpers.IXplatGeneratorOptions; function addFiles(options: Schema, target?: string, projectName?: string, extra?: string, framework?: FrameworkTypes): Rule; function adjustBarrelIndex(options: Schema, indexFilePath: string): Rule; function getTemplateOptions(options: Schema, platform: string, framework?: FrameworkTypes): any; function getMoveTo(options: Schema, platform: string, projectName?: string, framework?: FrameworkTypes): string; }