feat(focus): interactive options for focus handling

This commit is contained in:
Nathan Walker
2020-08-19 21:34:23 -07:00
parent 315f0e0f73
commit 1007cf9d92
11 changed files with 71 additions and 111 deletions

View File

@@ -29,7 +29,7 @@
"url": "https://github.com/NativeScript/nativescript-dev-webpack.git"
},
"scripts": {
"clean": "npx rimraf -- node_modules package-lock.json && npm i",
"clean": "npx rimraf -- node_modules package-lock.json && npm i --ignore-scripts",
"tsc": "tsc",
"postinstall": "node postinstall.js",
"preuninstall": "node preuninstall.js",

View File

@@ -1,33 +1,33 @@
export interface PlatformFSPluginOptions {
/**
* The target platform.
*/
platform?: string;
/**
* A list of all platforms. By default it is `["ios", "android", "desktop"]`.
*/
platforms?: string[];
/**
* An array of minimatch expressions used to filter nodes from the file system.
*/
ignore?: string[];
/**
* The target platform.
*/
platform?: string;
/**
* A list of all platforms. By default it is `["ios", "android", "desktop"]`.
*/
platforms?: string[];
/**
* An array of minimatch expressions used to filter nodes from the file system.
*/
ignore?: string[];
}
export declare class PlatformFSPlugin {
protected readonly platform: string;
protected readonly platforms: ReadonlyArray<string>;
protected readonly ignore: ReadonlyArray<string>;
protected context: string;
constructor({ platform, platforms, ignore }: PlatformFSPluginOptions);
apply(compiler: any): void;
protected readonly platform: string;
protected readonly platforms: ReadonlyArray<string>;
protected readonly ignore: ReadonlyArray<string>;
protected context: string;
constructor({ platform, platforms, ignore }: PlatformFSPluginOptions);
apply(compiler: any): void;
}
export interface MapFileSystemArgs {
/**
* This is the underlying webpack compiler.inputFileSystem, its interface is similar to Node's fs.
*/
readonly context: string;
readonly platform: string;
readonly platforms: ReadonlyArray<string>;
readonly ignore: ReadonlyArray<string>;
readonly compiler: any;
/**
* This is the underlying webpack compiler.inputFileSystem, its interface is similar to Node's fs.
*/
readonly context: string;
readonly platform: string;
readonly platforms: ReadonlyArray<string>;
readonly ignore: ReadonlyArray<string>;
readonly compiler: any;
}
export declare function mapFileSystem(args: MapFileSystemArgs): any;

View File

@@ -1,13 +1,13 @@
export declare enum messages {
compilationComplete = 'Webpack compilation complete.',
startWatching = 'Webpack compilation complete. Watching for file changes.',
changeDetected = 'File change detected. Starting incremental webpack compilation...',
compilationComplete = "Webpack compilation complete.",
startWatching = "Webpack compilation complete. Watching for file changes.",
changeDetected = "File change detected. Starting incremental webpack compilation..."
}
/**
* This little plugin will report the webpack state through the console.
* So the {N} CLI can get some idea when compilation completes.
*/
export declare class WatchStateLoggerPlugin {
isRunningWatching: boolean;
apply(compiler: any): void;
isRunningWatching: boolean;
apply(compiler: any): void;
}

View File

@@ -3,6 +3,6 @@ import { TransformOperation } from '@ngtools/webpack/src/transformers';
import { AngularCompilerPlugin } from '@ngtools/webpack';
export declare function nsSupportHmrNg(getNgCompiler: () => AngularCompilerPlugin, entryPath: string): ts.TransformerFactory<ts.SourceFile>;
export declare function handleHmrSupport(mainFile: ts.SourceFile): TransformOperation[];
export declare const GeneratedDynamicAppOptions = 'options_Generated';
export declare const GeneratedDynamicAppOptions = "options_Generated";
export declare function getHmrOptionsCode(appModuleName: string, appModulePath: string): string;
export declare function getAcceptMainModuleCode(mainModulePath: string): string;

View File

@@ -11,10 +11,7 @@ export declare function getAppModulePath(mainPath: string): string;
export declare function findIdentifierNode(node: ts.Node, text: string): ts.Node | null;
export declare function getObjectPropertyMatches(objectNode: ts.ObjectLiteralExpression, sourceFile: ts.SourceFile, targetPropertyName: string): ts.ObjectLiteralElement[];
export declare function getDecoratorMetadata(source: ts.SourceFile, identifier: string, module: string): ts.Node[];
export declare function angularImportsFromNode(
node: ts.ImportDeclaration,
_sourceFile: ts.SourceFile
): {
[name: string]: string;
export declare function angularImportsFromNode(node: ts.ImportDeclaration, _sourceFile: ts.SourceFile): {
[name: string]: string;
};
export declare function getExpressionName(expression: ts.Expression): string;

View File

@@ -1,8 +1,5 @@
import { AngularCompilerPlugin } from '@ngtools/webpack';
export declare function getResolvedEntryModule(
ngCompiler: AngularCompilerPlugin,
projectDir: string
): {
path: any;
className: string;
export declare function getResolvedEntryModule(ngCompiler: AngularCompilerPlugin, projectDir: string): {
path: any;
className: string;
};