Home > @acoustic-content-sdk/schematics-utils
schematics-utils package
Helper library to implement schematics.
Classes
Class | Description |
---|---|
InsertChange | Will add text to the source code. |
NoopChange | An operation that does nothing. |
RemoveChange | Will remove text from the source code. |
ReplaceChange | Will replace text from the source code. |
Enumerations
Enumeration | Description |
---|---|
Builders | |
DEP_TYPE | |
NodeDependencyType | |
ProjectType |
Functions
Function | Description |
---|---|
addBootstrapToModule(source, modulePath, classifiedName, importPath) | Custom function to insert an export into NgModule. It also imports it. |
addDeclarationToModule(source, modulePath, classifiedName, importPath) | Custom function to insert a declaration (component, pipe, directive) into NgModule declarations. It also imports the component. |
addEntryComponentToModule(source, modulePath, classifiedName, importPath) | Custom function to insert an entryComponent into NgModule. It also imports it. |
addExportToModule(source, modulePath, classifiedName, importPath) | Custom function to insert an export into NgModule. It also imports it. |
addImportsToModule(aFile, aModules, aHost) | Changes the identified module by adding a couple of imports |
addImportToModule(source, modulePath, classifiedName, importPath) | Custom function to insert an NgModule into NgModule imports. It also imports the module. |
addPackageJsonDependency(tree, dependency) | |
addProjectToWorkspace(workspace, name, project) | |
addProviderToModule(source, modulePath, classifiedName, importPath) | Custom function to insert a provider into NgModule. It also imports it. |
addRouteDeclarationToModule(source, fileToAdd, routeLiteral) | Adds a new route declaration to a router module (i.e. has a RouterModule declaration) |
addSymbolToNgModuleMetadata(source, ngModulePath, metadataField, symbolName, importPath) | |
addToWchToolsDependencies(aDeps, aPkg) | |
assertHasTrailingSlash(aValue) | |
assertIsEmail(aValue, aName) | |
assertIsUrl(aValue, aName) | |
assertIsValidUserName(aValue, aName) | |
assertNotNull(aValue, aName) | |
assertParameter(aValue, aParameterName) | |
buildDefaultPath(project) | Build a default project path for generating. |
buildRelativePath(from, to) | Build a relative path from one file path to another file path. |
byIdentifier(aName) | |
byName(aText) | |
byText(aText) | |
byType(aType) | |
byTypeAndName(aType, aName) | |
canonicalizeJSON(aData) | |
changeSourceFile(aFile, aOp, aHost) | |
copyDir(aSrc, aDst, aHost, aLogger) | Copies from source to target and overrides the target. But does not delete extra files |
createLoggerService(context) | Constructs the logger service on top of the context |
createTransientTree(aRoot) | Creates a transient copy of a tree |
ensureTrailingSlash(aUrl) | |
findBootstrapModuleCall(host, mainPath) | |
findBootstrapModulePath(host, mainPath) | |
findDataDir(host, options) | |
findModule(host, generateDir, moduleExt, routingModuleExt) | Function to find the "closest" module to a generated file's path. |
findModuleFromOptions(host, options) | Find the module referred by a set of options passed to the schematics. |
findNode(node, kind, text) | |
findNodes(node, kind, max, recursive) | Find all nodes from the AST in the subtree of node of SyntaxKind kind. |
findPackageJson(aDir) | |
findProject(workspaceOrHost, options) | Locates the workspace project, either from the configured project name, else falls back to the default project |
findProjectName(workspaceOrHost, options) | Locates the workspace project, either from the configured project name, else falls back to the default project |
findSdkVersion(host) | |
findWchToolsOptions(host, options) | |
getAppFromConfig(config, appIndexOrName) | |
getAppModulePath(host, mainPath) | |
getConfig(host) | |
getContentOfKeyLiteral(_source, node) | |
getDecoratorMetadata(source, identifier, module) | |
getEnvironmentExportName(source) | This function returns the name of the environment export whether this export is aliased or not. If the environment file is not imported, then it will return null . |
getFirstNgModuleName(source) | Given a source file with class(es), find the name of the first class. |
getFolderForType(aType) | |
getMetadataField(node, metadataField) | |
getPackageJsonDependency(tree, name) | |
getPackageManager(aHost) | Decodes the supported workspace from the host |
getProject(workspaceOrHost, projectName) | |
getProjectTargets(project) | |
getProjectTargets(workspaceOrHost, projectName) | |
getRouterModuleDeclaration(source) | Returns the RouterModule declaration from NgModule metadata, if any. |
getSourceFile(host, path) | |
getSourceFileFromFileEntry(aEntry) | |
getSourceNodes(sourceFile) | Get all the nodes from a source. |
getWorkspace(host) | |
getWorkspacePath(host) | |
hasTrailingSlash(aUrl) | |
insertAfterLastOccurrence(nodes, toInsert, file, fallbackPos, syntaxKind) | Insert toInsert after the last occurence of ts.SyntaxKind[nodes[i].kind] or after the last of occurence of syntaxKind if the last occurence is a sub child of SyntaxKind[nodes[i].kind] and save the changes in file. |
insertChanges(aChanges, aRecorder) | |
insertImport(source, fileToEdit, symbolName, fileName, isDefault) | Add Import import { symbolName } from fileName if the import doesn't exit already. Assumes fileToEdit can be resolved and accessed. |
insertLines(aSource, aInsert) | |
isImported(source, classifiedName, importPath) | Determine if an import already exists. |
isValidEmail(aValue) | |
isValidUrl(aValue) | |
isValidUserName(aValue) | |
isWorkspaceProject(project) | |
isWorkspaceSchema(workspace) | |
locatePackageJson(aDir) | Locates the name of the package.json starting with the current directory |
parseLines(aSource) | |
parseName(path, name) | |
readBufferOnTree(aHost, aRoot) | Constructs the ReadBuffer callback on top of a host |
readDirectoryOnTree(aHost, aRoot) | Creates a function callback that reads files from a host |
readRelativeDirectoryOnTree(aHost, aRoot) | Creates a function callback that reads files from a host |
readTextFileOnTree(aHost, aRoot) | Constructs the ReadTextFile callback on top of a host |
readWorkspace(aRoot) | Reads a workspace definition based on a root path |
removePackageJsonDependency(tree, name) | |
rxDownload(aUri, aDstFile) | |
rxFormPost(aUri, aData) | |
rxGet(aUri) | |
rxGetJson(aUri) | |
rxLocateDir(aSrcDir, aPredicate) | Locates the directory across the parent chain for which the predicate matches |
rxTransformHtmlFile(aName, aOp, aTree) | Reads an HMTL from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created. |
rxTransformHtmlFragment(aName, aOp, aTree) | Reads an HMTL from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created. |
rxTransformJsonFile(aName, aOp, aTree) | Reads a JSON file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created. |
rxTransformLinesFile(aName, aOp, aTree) | Reads a line based file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created. |
rxTransformTextFile(aName, aOp, aTree) | Reads a text file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created. |
rxUnzipFromUrl(aTree, aSrcUrl, aDstDir, aSkip) | |
safeWrite(aPath, aFile, aHost) | Overwrites file content, but only if it differs |
serializeJson(aData) | |
serializeLines(aSource) | |
syncDir(aSrc, aDst, aHost, aLogger) | |
targetBuildNotFoundError() | |
updateField(aName, aGenerator, aObj) | |
updateMinVersion(aName, aMinVersion, aPkg, aType) | Updates the package JSON to use at least the given version |
updateWorkspace(workspace) | |
validateApiUrl(aUrl, bValidateWithCredentials) | Tests if the API URL is valid and if we have sufficient credentials to access the API |
validateCredentials(aApiUrl, aCredentials) | |
validateHtmlSelector(selector) | |
validateName(name) | |
validateProjectName(projectName) | |
writeFilesOnTree(aHost, aRoot) | Returns an operator that writes all file descriptors to disk |
Interfaces
Interface | Description |
---|---|
AppConfig | |
AppShellBuilderOptions | |
BrowserBuilderBaseOptions | |
BrowserBuilderOptions | |
BuilderTarget | |
Change | |
CliConfig | |
E2EOptions | |
ExtractI18nOptions | |
FileReplacements | |
Host | Copyright Google Inc. All Rights Reserved.Use of this source code is governed by an MIT-style license that can be found in the LICENSE file at https://angular.io/license |
LibraryBuilderOptions | |
LintBuilderOptions | |
Location | |
ModuleOptions | |
NodeDependency | |
ServeBuilderOptions | |
ServerBuilderOptions | |
TestBuilderOptions | |
WorkspaceProject | |
WorkspaceSchema | |
WorkspaceTargets | |
ZipEntry |
Variables
Variable | Description |
---|---|
ajaxRequest | |
configPath | |
createXHR | |
htmlSelectorRe | |
MODULE_EXT | |
NOOP_LOGGER | |
ROUTING_MODULE_EXT | |
rxDeleteFile | |
rxReadTextFile | |
rxReadZip | Export the function to extract a zip file |
rxTmpFile | |
rxUnlink | |
TENANT_BASED_URL_REGEXP | |
VERSION | Version and build number of the package |
WCHTOOLS_DEPENDENCIES | |
writeBufferOnTree | Constructs a WriteTextFile on top of a host |
writeTextFileOnTree | Constructs a WriteTextFile on top of a host |
Type Aliases
Home > @acoustic-content-sdk/schematics-utils > InsertChange
InsertChange class
Will add text to the source code.
Signature:
export declare class InsertChange implements Change
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(path, pos, toAdd) | Constructs a new instance of the InsertChange class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
description | string |
||
order | number |
||
path | string |
||
pos | number |
||
toAdd | string |
Methods
Method | Modifiers | Description |
---|---|---|
apply(host) | This method does not insert spaces if there is none in the original string. |
Home > @acoustic-content-sdk/schematics-utils > NoopChange
NoopChange class
An operation that does nothing.
Signature:
export declare class NoopChange implements Change
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
description | string |
||
order | number |
||
path | any |
Methods
Method | Modifiers | Description |
---|---|---|
apply() |
Home > @acoustic-content-sdk/schematics-utils > RemoveChange
RemoveChange class
Will remove text from the source code.
Signature:
export declare class RemoveChange implements Change
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(path, pos, toRemove) | Constructs a new instance of the RemoveChange class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
description | string |
||
order | number |
||
path | string |
Methods
Method | Modifiers | Description |
---|---|---|
apply(host) |
Home > @acoustic-content-sdk/schematics-utils > ReplaceChange
ReplaceChange class
Will replace text from the source code.
Signature:
export declare class ReplaceChange implements Change
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(path, pos, oldText, newText) | Constructs a new instance of the ReplaceChange class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
description | string |
||
order | number |
||
path | string |
Methods
Method | Modifiers | Description |
---|---|---|
apply(host) |
Home > @acoustic-content-sdk/schematics-utils > Builders
Builders enum
Signature:
export declare enum Builders
Enumeration Members
Member | Value | Description |
---|---|---|
AppShell | "@angular-devkit/build-angular:app-shell" |
|
Browser | "@angular-devkit/build-angular:browser" |
|
DevServer | "@angular-devkit/build-angular:dev-server" |
|
ExtractI18n | "@angular-devkit/build-angular:extract-i18n" |
|
Karma | "@angular-devkit/build-angular:karma" |
|
NgPackagr | "@angular-devkit/build-ng-packagr:build" |
|
Protractor | "@angular-devkit/build-angular:protractor" |
|
Server | "@angular-devkit/build-angular:server" |
|
TsLint | "@angular-devkit/build-angular:tslint" |
Home > @acoustic-content-sdk/schematics-utils > DEP_TYPE
DEP_TYPE enum
Signature:
export declare enum DEP_TYPE
Enumeration Members
Member | Value | Description |
---|---|---|
DEVELOPMENT | 2 |
|
PEER | 0 |
|
RUNTIME | 1 |
Home > @acoustic-content-sdk/schematics-utils > NodeDependencyType
NodeDependencyType enum
Signature:
export declare enum NodeDependencyType
Enumeration Members
Member | Value | Description |
---|---|---|
Default | "dependencies" |
|
Dev | "devDependencies" |
|
Optional | "optionalDependencies" |
|
Peer | "peerDependencies" |
Home > @acoustic-content-sdk/schematics-utils > ProjectType
ProjectType enum
Signature:
export declare enum ProjectType
Enumeration Members
Member | Value | Description |
---|---|---|
Application | "application" |
|
Library | "library" |
Home > @acoustic-content-sdk/schematics-utils > addBootstrapToModule
addBootstrapToModule() function
Custom function to insert an export into NgModule. It also imports it.
Signature:
export declare function addBootstrapToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
|
modulePath | string |
|
classifiedName | string |
|
importPath | string |
Returns:
Change[]
Home > @acoustic-content-sdk/schematics-utils > addDeclarationToModule
addDeclarationToModule() function
Custom function to insert a declaration (component, pipe, directive) into NgModule declarations. It also imports the component.
Signature:
export declare function addDeclarationToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
|
modulePath | string |
|
classifiedName | string |
|
importPath | string |
Returns:
Change[]
Home > @acoustic-content-sdk/schematics-utils > addEntryComponentToModule
addEntryComponentToModule() function
Warning: This API is now obsolete.
- Since version 9.0.0 with Ivy, entryComponents is no longer necessary.
Custom function to insert an entryComponent into NgModule. It also imports it.
Signature:
export declare function addEntryComponentToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
|
modulePath | string |
|
classifiedName | string |
|
importPath | string |
Returns:
Change[]
Home > @acoustic-content-sdk/schematics-utils > addExportToModule
addExportToModule() function
Custom function to insert an export into NgModule. It also imports it.
Signature:
export declare function addExportToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
|
modulePath | string |
|
classifiedName | string |
|
importPath | string |
Returns:
Change[]
Home > @acoustic-content-sdk/schematics-utils > addImportsToModule
addImportsToModule() function
Changes the identified module by adding a couple of imports
Signature:
export declare function addImportsToModule(aFile: string, aModules: {
[identifier: string]: string;
}, aHost: Tree): void;
Parameters
Parameter | Type | Description |
---|---|---|
aFile | string |
the filename |
aModules |
{ [identifier: string]: string; }
|
the modules to be added |
aHost | Tree |
the tree |
Returns:
void
Home > @acoustic-content-sdk/schematics-utils > addImportToModule
addImportToModule() function
Custom function to insert an NgModule into NgModule imports. It also imports the module.
Signature:
export declare function addImportToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
|
modulePath | string |
|
classifiedName | string |
|
importPath | string |
Returns:
Change[]
Home > @acoustic-content-sdk/schematics-utils > addPackageJsonDependency
addPackageJsonDependency() function
Signature:
export declare function addPackageJsonDependency(tree: Tree, dependency: NodeDependency): void;
Parameters
Parameter | Type | Description |
---|---|---|
tree | Tree |
|
dependency | NodeDependency |
Returns:
void
Home > @acoustic-content-sdk/schematics-utils > addProjectToWorkspace
addProjectToWorkspace() function
Signature:
export declare function addProjectToWorkspace<TProjectType extends ProjectType = ProjectType.Application>(workspace: WorkspaceSchema, name: string, project: WorkspaceProject<TProjectType>): Rule;
Parameters
Parameter | Type | Description |
---|---|---|
workspace | WorkspaceSchema |
|
name | string |
|
project | WorkspaceProject<TProjectType> |
Returns:
Rule
Home > @acoustic-content-sdk/schematics-utils > addProviderToModule
addProviderToModule() function
Custom function to insert a provider into NgModule. It also imports it.
Signature:
export declare function addProviderToModule(source: SourceFile, modulePath: string, classifiedName: string, importPath: string): Change[];
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
|
modulePath | string |
|
classifiedName | string |
|
importPath | string |
Returns:
Change[]
Home > @acoustic-content-sdk/schematics-utils > addRouteDeclarationToModule
addRouteDeclarationToModule() function
Adds a new route declaration to a router module (i.e. has a RouterModule declaration)
Signature:
export declare function addRouteDeclarationToModule(source: SourceFile, fileToAdd: string, routeLiteral: string): Change;
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
|
fileToAdd | string |
|
routeLiteral | string |
Returns:
Change
Home > @acoustic-content-sdk/schematics-utils > addSymbolToNgModuleMetadata
addSymbolToNgModuleMetadata() function
Signature:
export declare function addSymbolToNgModuleMetadata(source: SourceFile, ngModulePath: string, metadataField: string, symbolName: string, importPath?: string | null): Change[];
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
|
ngModulePath | string |
|
metadataField | string |
|
symbolName | string |
|
importPath | string | null |
Returns:
Change[]
Home > @acoustic-content-sdk/schematics-utils > addToWchToolsDependencies
addToWchToolsDependencies() function
Signature:
export declare function addToWchToolsDependencies(aDeps: string[], aPkg: any): void;
Parameters
Parameter | Type | Description |
---|---|---|
aDeps | string[] |
|
aPkg | any |
Returns:
void
Home > @acoustic-content-sdk/schematics-utils > assertHasTrailingSlash
assertHasTrailingSlash() function
Signature:
export declare function assertHasTrailingSlash(aValue: any): string;
Parameters
Parameter | Type | Description |
---|---|---|
aValue | any |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > assertIsEmail
assertIsEmail() function
Signature:
export declare function assertIsEmail(aValue: any, aName?: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
aValue | any |
|
aName | string |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > assertIsUrl
assertIsUrl() function
Signature:
export declare function assertIsUrl(aValue: any, aName?: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
aValue | any |
|
aName | string |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > assertIsValidUserName
assertIsValidUserName() function
Signature:
export declare function assertIsValidUserName(aValue: any, aName?: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
aValue | any |
|
aName | string |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > assertNotNull
assertNotNull() function
Signature:
export declare function assertNotNull(aValue: any, aName?: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
aValue | any |
|
aName | string |
Returns:
void
Home > @acoustic-content-sdk/schematics-utils > assertParameter
assertParameter() function
Signature:
export declare function assertParameter(aValue: any, aParameterName: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
aValue | any |
|
aParameterName | string |
Returns:
void
Home > @acoustic-content-sdk/schematics-utils > buildDefaultPath
buildDefaultPath() function
Build a default project path for generating.
Signature:
export declare function buildDefaultPath(project: WorkspaceProject): string;
Parameters
Parameter | Type | Description |
---|---|---|
project | WorkspaceProject |
The project to build the path for. |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > buildRelativePath
buildRelativePath() function
Build a relative path from one file path to another file path.
Signature:
export declare function buildRelativePath(from: string, to: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
from | string |
|
to | string |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > byIdentifier
byIdentifier() function
Signature:
export declare function byIdentifier(aName: string): Predicate<Node>;
Parameters
Parameter | Type | Description |
---|---|---|
aName | string |
Returns:
Predicate<Node>
Home > @acoustic-content-sdk/schematics-utils > byName
byName() function
Signature:
export declare function byName(aText: string): Predicate<NamedDeclaration>;
Parameters
Parameter | Type | Description |
---|---|---|
aText | string |
Returns:
Predicate<NamedDeclaration>
Home > @acoustic-content-sdk/schematics-utils > byText
byText() function
Signature:
export declare function byText(aText: string): Predicate<Node>;
Parameters
Parameter | Type | Description |
---|---|---|
aText | string |
Returns:
Predicate<Node>
Home > @acoustic-content-sdk/schematics-utils > byType
byType() function
Signature:
export declare function byType(aType: SyntaxKind): Predicate<Node>;
Parameters
Parameter | Type | Description |
---|---|---|
aType | SyntaxKind |
Returns:
Predicate<Node>
Home > @acoustic-content-sdk/schematics-utils > byTypeAndName
byTypeAndName() function
Signature:
export declare function byTypeAndName(aType: SyntaxKind, aName: string): Predicate<Node>;
Parameters
Parameter | Type | Description |
---|---|---|
aType | SyntaxKind |
|
aName | string |
Returns:
Predicate<Node>
Home > @acoustic-content-sdk/schematics-utils > canonicalizeJSON
canonicalizeJSON() function
Signature:
declare function _canonicalize(aData: any): any;
Parameters
Parameter | Type | Description |
---|---|---|
aData | any |
Returns:
any
Home > @acoustic-content-sdk/schematics-utils > changeSourceFile
changeSourceFile() function
Signature:
export declare function changeSourceFile(aFile: string, aOp: (aFile: string, aContent: SourceFile) => Change[], aHost: Tree): void;
Parameters
Parameter | Type | Description |
---|---|---|
aFile | string |
|
aOp | (aFile: string, aContent: SourceFile) => Change[] |
|
aHost | Tree |
Returns:
void
Home > @acoustic-content-sdk/schematics-utils > copyDir
copyDir() function
Copies from source to target and overrides the target. But does not delete extra files
Signature:
export declare function copyDir(aSrc: string, aDst: string, aHost: Tree, aLogger?: Logger): Tree;
Parameters
Parameter | Type | Description |
---|---|---|
aSrc | string |
source directory |
aDst | string |
target directory |
aHost | Tree |
tree |
aLogger | Logger |
Returns:
Tree
the tree
Home > @acoustic-content-sdk/schematics-utils > createLoggerService
createLoggerService() function
Constructs the logger service on top of the context
Signature:
export declare function createLoggerService(context: SchematicContext): LoggerService;
Parameters
Parameter | Type | Description |
---|---|---|
context | SchematicContext |
context |
Returns:
LoggerService
the logger service
Home > @acoustic-content-sdk/schematics-utils > createTransientTree
createTransientTree() function
Creates a transient copy of a tree
Signature:
export declare function createTransientTree(aRoot: string): Tree;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
root folder for the tree |
Returns:
Tree
the tree
Home > @acoustic-content-sdk/schematics-utils > ensureTrailingSlash
ensureTrailingSlash() function
Signature:
declare function _ensureTrailingSlash(aUrl: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
aUrl | string |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > findBootstrapModuleCall
findBootstrapModuleCall() function
Signature:
export declare function findBootstrapModuleCall(host: Tree, mainPath: string): CallExpression | null;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
|
mainPath | string |
Returns:
CallExpression | null
Home > @acoustic-content-sdk/schematics-utils > findBootstrapModulePath
findBootstrapModulePath() function
Signature:
export declare function findBootstrapModulePath(host: Tree, mainPath: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
|
mainPath | string |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > findDataDir
findDataDir() function
Signature:
export declare function findDataDir(host: Tree, options?: {
data?: string;
}): Path;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
|
options |
{ data?: string; }
|
Returns:
Path
Home > @acoustic-content-sdk/schematics-utils > findModule
findModule() function
Function to find the "closest" module to a generated file's path.
Signature:
export declare function findModule(host: Tree, generateDir: string, moduleExt?: string, routingModuleExt?: string): Path;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
|
generateDir | string |
|
moduleExt | string |
|
routingModuleExt | string |
Returns:
Path
Home > @acoustic-content-sdk/schematics-utils > findModuleFromOptions
findModuleFromOptions() function
Find the module referred by a set of options passed to the schematics.
Signature:
export declare function findModuleFromOptions(host: Tree, options: ModuleOptions): Path | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
|
options | ModuleOptions |
Returns:
Path | undefined
Home > @acoustic-content-sdk/schematics-utils > findNode
findNode() function
Signature:
export declare function findNode(node: Node, kind: SyntaxKind, text: string): Node | null;
Parameters
Parameter | Type | Description |
---|---|---|
node | Node |
|
kind | SyntaxKind |
|
text | string |
Returns:
Node | null
Home > @acoustic-content-sdk/schematics-utils > findNodes
findNodes() function
Find all nodes from the AST in the subtree of node of SyntaxKind kind.
Signature:
export declare function findNodes(node: Node, kind: SyntaxKind, max?: number, recursive?: boolean): Node[];
Parameters
Parameter | Type | Description |
---|---|---|
node | Node |
|
kind | SyntaxKind |
|
max | number |
The maximum number of items to return. |
recursive | boolean |
Continue looking for nodes of kind recursive until end the last child even when node of kind has been found. |
Returns:
Node[]
all nodes of kind, or [] if none is found
Home > @acoustic-content-sdk/schematics-utils > findPackageJson
findPackageJson() function
Signature:
export declare function findPackageJson(aDir: string): Observable<any>;
Parameters
Parameter | Type | Description |
---|---|---|
aDir | string |
Returns:
Observable<any>
Home > @acoustic-content-sdk/schematics-utils > findProject
findProject() function
Locates the workspace project, either from the configured project name, else falls back to the default project
Signature:
export declare function findProject<TProjectType extends ProjectType = ProjectType.Application>(workspaceOrHost: WorkspaceSchema | Tree, options: {
project?: string;
}): WorkspaceProject<TProjectType>;
Parameters
Parameter | Type | Description |
---|---|---|
workspaceOrHost | WorkspaceSchema | Tree |
the workspace root |
options |
{ project?: string; }
|
the options |
Returns:
WorkspaceProject<TProjectType>
the project
Home > @acoustic-content-sdk/schematics-utils > findProjectName
findProjectName() function
Locates the workspace project, either from the configured project name, else falls back to the default project
Signature:
export declare function findProjectName(workspaceOrHost: WorkspaceSchema | Tree, options: {
project?: string;
}): string;
Parameters
Parameter | Type | Description |
---|---|---|
workspaceOrHost | WorkspaceSchema | Tree |
the workspace root |
options |
{ project?: string; }
|
the options |
Returns:
string
the project
Home > @acoustic-content-sdk/schematics-utils > findSdkVersion
findSdkVersion() function
Signature:
export declare function findSdkVersion(host: Tree): string;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > findWchToolsOptions
findWchToolsOptions() function
Signature:
export declare function findWchToolsOptions(host: Tree, options?: {
data?: string;
}): Path;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
|
options |
{ data?: string; }
|
Returns:
Path
Home > @acoustic-content-sdk/schematics-utils > getAppFromConfig
getAppFromConfig() function
Signature:
export declare function getAppFromConfig(config: CliConfig, appIndexOrName: string): AppConfig | null;
Parameters
Parameter | Type | Description |
---|---|---|
config | CliConfig |
|
appIndexOrName | string |
Returns:
AppConfig | null
Home > @acoustic-content-sdk/schematics-utils > getAppModulePath
getAppModulePath() function
Signature:
export declare function getAppModulePath(host: Tree, mainPath: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
|
mainPath | string |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > getConfig
getConfig() function
Signature:
export declare function getConfig(host: Tree): CliConfig;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
Returns:
CliConfig
Home > @acoustic-content-sdk/schematics-utils > getContentOfKeyLiteral
getContentOfKeyLiteral() function
Signature:
export declare function getContentOfKeyLiteral(_source: SourceFile, node: Node): string | null;
Parameters
Parameter | Type | Description |
---|---|---|
_source | SourceFile |
|
node | Node |
Returns:
string | null
Home > @acoustic-content-sdk/schematics-utils > getDecoratorMetadata
getDecoratorMetadata() function
Signature:
export declare function getDecoratorMetadata(source: SourceFile, identifier: string, module: string): Node[];
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
|
identifier | string |
|
module | string |
Returns:
Node[]
Home > @acoustic-content-sdk/schematics-utils > getEnvironmentExportName
getEnvironmentExportName() function
This function returns the name of the environment export whether this export is aliased or not. If the environment file is not imported, then it will return null
.
Signature:
export declare function getEnvironmentExportName(source: SourceFile): string | null;
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
Returns:
string | null
Home > @acoustic-content-sdk/schematics-utils > getFirstNgModuleName
getFirstNgModuleName() function
Given a source file with class(es), find the name of the first class.
Signature:
export declare function getFirstNgModuleName(source: SourceFile): string | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
source file containing one or more |
Returns:
string | undefined
the name of the first @NgModule, or undefined
if none is found
Home > @acoustic-content-sdk/schematics-utils > getFolderForType
getFolderForType() function
Signature:
export declare function getFolderForType(aType?: DEP_TYPE): string;
Parameters
Parameter | Type | Description |
---|---|---|
aType | DEP_TYPE |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > getMetadataField
getMetadataField() function
Signature:
export declare function getMetadataField(node: ObjectLiteralExpression, metadataField: string): ObjectLiteralElement[];
Parameters
Parameter | Type | Description |
---|---|---|
node | ObjectLiteralExpression |
|
metadataField | string |
Returns:
ObjectLiteralElement[]
Home > @acoustic-content-sdk/schematics-utils > getPackageJsonDependency
getPackageJsonDependency() function
Signature:
export declare function getPackageJsonDependency(tree: Tree, name: string): NodeDependency | null;
Parameters
Parameter | Type | Description |
---|---|---|
tree | Tree |
|
name | string |
Returns:
NodeDependency | null
Home > @acoustic-content-sdk/schematics-utils > getPackageManager
getPackageManager() function
Decodes the supported workspace from the host
Signature:
export declare function getPackageManager(aHost: Tree): Observable<PackageManager>;
Parameters
Parameter | Type | Description |
---|---|---|
aHost | Tree |
the host tree |
Returns:
Observable<PackageManager>
the supported package manager
Home > @acoustic-content-sdk/schematics-utils > getProject
getProject() function
Signature:
export declare function getProject<TProjectType extends ProjectType = ProjectType.Application>(workspaceOrHost: WorkspaceSchema | Tree, projectName: string): WorkspaceProject<TProjectType>;
Parameters
Parameter | Type | Description |
---|---|---|
workspaceOrHost | WorkspaceSchema | Tree |
|
projectName | string |
Returns:
WorkspaceProject<TProjectType>
Home > @acoustic-content-sdk/schematics-utils > getProjectTargets
getProjectTargets() function
Signature:
export declare function getProjectTargets(project: WorkspaceProject): WorkspaceTargets;
Parameters
Parameter | Type | Description |
---|---|---|
project | WorkspaceProject |
Returns:
WorkspaceTargets
Home > @acoustic-content-sdk/schematics-utils > getProjectTargets
getProjectTargets() function
Signature:
export declare function getProjectTargets(workspaceOrHost: WorkspaceSchema | Tree, projectName: string): WorkspaceTargets;
Parameters
Parameter | Type | Description |
---|---|---|
workspaceOrHost | WorkspaceSchema | Tree |
|
projectName | string |
Returns:
WorkspaceTargets
Home > @acoustic-content-sdk/schematics-utils > getRouterModuleDeclaration
getRouterModuleDeclaration() function
Returns the RouterModule declaration from NgModule metadata, if any.
Signature:
export declare function getRouterModuleDeclaration(source: SourceFile): Expression | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
Returns:
Expression | undefined
Home > @acoustic-content-sdk/schematics-utils > getSourceFile
getSourceFile() function
Signature:
export declare function getSourceFile(host: Tree, path: string): SourceFile;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
|
path | string |
Returns:
SourceFile
Home > @acoustic-content-sdk/schematics-utils > getSourceFileFromFileEntry
getSourceFileFromFileEntry() function
Signature:
export declare function getSourceFileFromFileEntry(aEntry: FileEntry): SourceFile;
Parameters
Parameter | Type | Description |
---|---|---|
aEntry | FileEntry |
Returns:
SourceFile
Home > @acoustic-content-sdk/schematics-utils > getSourceNodes
getSourceNodes() function
Get all the nodes from a source.
Signature:
export declare function getSourceNodes(sourceFile: SourceFile): Node[];
Parameters
Parameter | Type | Description |
---|---|---|
sourceFile | SourceFile |
The source file object. |
Returns:
Node[]
An observable of all the nodes in the source.
Home > @acoustic-content-sdk/schematics-utils > getWorkspace
getWorkspace() function
Signature:
export declare function getWorkspace(host: Tree): WorkspaceSchema;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
Returns:
WorkspaceSchema
Home > @acoustic-content-sdk/schematics-utils > getWorkspacePath
getWorkspacePath() function
Signature:
export declare function getWorkspacePath(host: Tree): string;
Parameters
Parameter | Type | Description |
---|---|---|
host | Tree |
Returns:
string
Home > @acoustic-content-sdk/schematics-utils > hasTrailingSlash
hasTrailingSlash() function
Signature:
declare function _hasTrailingSlash(aUrl: string): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
aUrl | string |
Returns:
boolean
Home > @acoustic-content-sdk/schematics-utils > insertAfterLastOccurrence
insertAfterLastOccurrence() function
Insert toInsert
after the last occurence of ts.SyntaxKind[nodes[i].kind]
or after the last of occurence of syntaxKind
if the last occurence is a sub child of SyntaxKind[nodes[i].kind] and save the changes in file.
Signature:
export declare function insertAfterLastOccurrence(nodes: Node[], toInsert: string, file: string, fallbackPos: number, syntaxKind?: SyntaxKind): Change;
Parameters
Parameter | Type | Description |
---|---|---|
nodes | Node[] |
insert after the last occurence of nodes |
toInsert | string |
string to insert |
file | string |
file to insert changes into |
fallbackPos | number |
position to insert if toInsert happens to be the first occurence |
syntaxKind | SyntaxKind |
the SyntaxKind of the subchildren to insert after |
Returns:
Change
Change instance Error if toInsert is first occurence but fall back is not set
Home > @acoustic-content-sdk/schematics-utils > insertChanges
insertChanges() function
Signature:
export declare function insertChanges(aChanges: Change[], aRecorder: UpdateRecorder): void;
Parameters
Parameter | Type | Description |
---|---|---|
aChanges | Change[] |
|
aRecorder | UpdateRecorder |
Returns:
void
Home > @acoustic-content-sdk/schematics-utils > insertImport
insertImport() function
Add Import import { symbolName } from fileName
if the import doesn't exit already. Assumes fileToEdit can be resolved and accessed.
Signature:
export declare function insertImport(source: SourceFile, fileToEdit: string, symbolName: string, fileName: string, isDefault?: boolean): Change;
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
|
fileToEdit | string |
(file we want to add import to) |
symbolName | string |
(item to import) |
fileName | string |
(path to the file) |
isDefault | boolean |
(if true, import follows style for importing default exports) |
Returns:
Change
Change
Home > @acoustic-content-sdk/schematics-utils > insertLines
insertLines() function
Signature:
export declare function insertLines(aSource: string[] | undefined, aInsert: string[]): string[];
Parameters
Parameter | Type | Description |
---|---|---|
aSource | string[] | undefined |
|
aInsert | string[] |
Returns:
string[]
Home > @acoustic-content-sdk/schematics-utils > isImported
isImported() function
Determine if an import already exists.
Signature:
export declare function isImported(source: SourceFile, classifiedName: string, importPath: string): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
source | SourceFile |
|
classifiedName | string |
|
importPath | string |
Returns:
boolean
Home > @acoustic-content-sdk/schematics-utils > isValidEmail
isValidEmail() function
Signature:
export declare function isValidEmail(aValue: any): aValue is string;
Parameters
Parameter | Type | Description |
---|---|---|
aValue | any |
Returns:
aValue is string
Home > @acoustic-content-sdk/schematics-utils > isValidUrl
isValidUrl() function
Signature:
export declare function isValidUrl(aValue: any): aValue is string;
Parameters
Parameter | Type | Description |
---|---|---|
aValue | any |
Returns:
aValue is string
Home > @acoustic-content-sdk/schematics-utils > isValidUserName
isValidUserName() function
Signature:
export declare function isValidUserName(aValue: any): aValue is string;
Parameters
Parameter | Type | Description |
---|---|---|
aValue | any |
Returns:
aValue is string
Home > @acoustic-content-sdk/schematics-utils > isWorkspaceProject
isWorkspaceProject() function
Signature:
export declare function isWorkspaceProject(project: any): project is WorkspaceProject;
Parameters
Parameter | Type | Description |
---|---|---|
project | any |
Returns:
project is WorkspaceProject
Home > @acoustic-content-sdk/schematics-utils > isWorkspaceSchema
isWorkspaceSchema() function
Signature:
export declare function isWorkspaceSchema(workspace: any): workspace is WorkspaceSchema;
Parameters
Parameter | Type | Description |
---|---|---|
workspace | any |
Returns:
workspace is WorkspaceSchema
Home > @acoustic-content-sdk/schematics-utils > locatePackageJson
locatePackageJson() function
Locates the name of the package.json starting with the current directory
Signature:
export declare function locatePackageJson(aDir: string): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aDir | string |
root directory |
Returns:
Observable<string>
Home > @acoustic-content-sdk/schematics-utils > parseLines
parseLines() function
Signature:
export declare function parseLines(aSource?: string): string[];
Parameters
Parameter | Type | Description |
---|---|---|
aSource | string |
Returns:
string[]
Home > @acoustic-content-sdk/schematics-utils > parseName
parseName() function
Signature:
export declare function parseName(path: string, name: string): Location;
Parameters
Parameter | Type | Description |
---|---|---|
path | string |
|
name | string |
Returns:
Location
Home > @acoustic-content-sdk/schematics-utils > readBufferOnTree
readBufferOnTree() function
Constructs the ReadBuffer callback on top of a host
Signature:
export declare function readBufferOnTree(aHost: Tree, aRoot?: Path): ReadBuffer;
Parameters
Parameter | Type | Description |
---|---|---|
aHost | Tree |
the host |
aRoot | Path |
optionally a root path |
Returns:
ReadBuffer
the callback
Home > @acoustic-content-sdk/schematics-utils > readDirectoryOnTree
readDirectoryOnTree() function
Creates a function callback that reads files from a host
Signature:
export declare function readDirectoryOnTree(aHost: Tree, aRoot?: Path): ReadDirectory;
Parameters
Parameter | Type | Description |
---|---|---|
aHost | Tree |
the host |
aRoot | Path |
optional root path |
Returns:
ReadDirectory
the callback
Home > @acoustic-content-sdk/schematics-utils > readRelativeDirectoryOnTree
readRelativeDirectoryOnTree() function
Creates a function callback that reads files from a host
Signature:
export declare function readRelativeDirectoryOnTree(aHost: Tree, aRoot?: Path): ReadDirectory;
Parameters
Parameter | Type | Description |
---|---|---|
aHost | Tree |
the host |
aRoot | Path |
optional root path |
Returns:
ReadDirectory
the callback
Home > @acoustic-content-sdk/schematics-utils > readTextFileOnTree
readTextFileOnTree() function
Constructs the ReadTextFile callback on top of a host
Signature:
export declare function readTextFileOnTree(aHost: Tree, aRoot?: Path): ReadTextFile;
Parameters
Parameter | Type | Description |
---|---|---|
aHost | Tree |
the host |
aRoot | Path |
optionally a root path |
Returns:
ReadTextFile
the callback
Home > @acoustic-content-sdk/schematics-utils > readWorkspace
readWorkspace() function
Reads a workspace definition based on a root path
Signature:
export declare function readWorkspace(aRoot: string): Promise<{
workspace: workspaces.WorkspaceDefinition;
}>;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
the root path |
Returns:
Promise<{ workspace: workspaces.WorkspaceDefinition; }>
the workspace definition
Home > @acoustic-content-sdk/schematics-utils > removePackageJsonDependency
removePackageJsonDependency() function
Signature:
export declare function removePackageJsonDependency(tree: Tree, name: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
tree | Tree |
|
name | string |
Returns:
void
Home > @acoustic-content-sdk/schematics-utils > rxDownload
rxDownload() function
Signature:
export declare function rxDownload<T extends PathLike>(aUri: string, aDstFile: T): Observable<T>;
Parameters
Parameter | Type | Description |
---|---|---|
aUri | string |
|
aDstFile | T |
Returns:
Observable<T>
Home > @acoustic-content-sdk/schematics-utils > rxFormPost
rxFormPost() function
Signature:
export declare function rxFormPost(aUri: string, aData: any): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aUri | string |
|
aData | any |
Returns:
Observable<string>
Home > @acoustic-content-sdk/schematics-utils > rxGet
rxGet() function
Signature:
export declare function rxGet(aUri: string): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aUri | string |
Returns:
Observable<string>
Home > @acoustic-content-sdk/schematics-utils > rxGetJson
rxGetJson() function
Signature:
export declare function rxGetJson(aUri: string): Observable<any>;
Parameters
Parameter | Type | Description |
---|---|---|
aUri | string |
Returns:
Observable<any>
Home > @acoustic-content-sdk/schematics-utils > rxLocateDir
rxLocateDir() function
Locates the directory across the parent chain for which the predicate matches
Signature:
export declare function rxLocateDir(aSrcDir: string, aPredicate: UnaryFunction<string, Observable<boolean>>): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aSrcDir | string |
the source directory |
aPredicate | UnaryFunction<string, Observable<boolean>> |
the predicate to check |
Returns:
Observable<string>
the matching directory
Home > @acoustic-content-sdk/schematics-utils > rxTransformHtmlFile
rxTransformHtmlFile() function
Reads an HMTL from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
Signature:
export declare function rxTransformHtmlFile(aName: string, aOp: TransformCallback<Document>, aTree: Tree): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aName | string |
name of the file |
aOp | TransformCallback<Document> |
the operator |
aTree | Tree |
the tree to work in |
Returns:
Observable<string>
Home > @acoustic-content-sdk/schematics-utils > rxTransformHtmlFragment
rxTransformHtmlFragment() function
Reads an HMTL from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
Signature:
export declare function rxTransformHtmlFragment(aName: string, aOp: TransformCallback<DocumentFragment>, aTree: Tree): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aName | string |
name of the file |
aOp | TransformCallback<DocumentFragment> |
the operator |
aTree | Tree |
the tree to work in |
Returns:
Observable<string>
Home > @acoustic-content-sdk/schematics-utils > rxTransformJsonFile
rxTransformJsonFile() function
Reads a JSON file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
Signature:
export declare function rxTransformJsonFile(aName: string, aOp: TransformCallback<any>, aTree: Tree): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aName | string |
name of the file |
aOp | TransformCallback<any> |
the operator |
aTree | Tree |
the tree to work in |
Returns:
Observable<string>
Home > @acoustic-content-sdk/schematics-utils > rxTransformLinesFile
rxTransformLinesFile() function
Reads a line based file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
Signature:
export declare function rxTransformLinesFile(aName: string, aOp: TransformCallback<string[]>, aTree: Tree): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aName | string |
name of the file |
aOp | TransformCallback<string[]> |
the operator |
aTree | Tree |
the tree to work in |
Returns:
Observable<string>
Home > @acoustic-content-sdk/schematics-utils > rxTransformTextFile
rxTransformTextFile() function
Reads a text file from the tree and then transforms it using the given function. If the result is null or undefined, the file will be deleted, else replaced or created.
Signature:
export declare function rxTransformTextFile(aName: string, aOp: TransformCallback<string>, aTree: Tree): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aName | string |
name of the file |
aOp | TransformCallback<string> |
the operator |
aTree | Tree |
the tree to work in |
Returns:
Observable<string>
Home > @acoustic-content-sdk/schematics-utils > rxUnzipFromUrl
rxUnzipFromUrl() function
Signature:
export declare function rxUnzipFromUrl(aTree: Tree, aSrcUrl: string, aDstDir: string, aSkip?: number): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aTree | Tree |
|
aSrcUrl | string |
|
aDstDir | string |
|
aSkip | number |
Returns:
Observable<string>
Home > @acoustic-content-sdk/schematics-utils > safeWrite
safeWrite() function
Overwrites file content, but only if it differs
Signature:
export declare function safeWrite(aPath: string, aFile: string | Buffer, aHost: Tree): Tree;
Parameters
Parameter | Type | Description |
---|---|---|
aPath | string |
|
aFile | string | Buffer |
|
aHost | Tree |
Returns:
Tree
Home > @acoustic-content-sdk/schematics-utils > serializeJson
serializeJson() function
Signature:
export declare function serializeJson(aData: any): string | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
aData | any |
Returns:
string | undefined
Home > @acoustic-content-sdk/schematics-utils > serializeLines
serializeLines() function
Signature:
export declare function serializeLines(aSource?: string[]): string | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
aSource | string[] |
Returns:
string | undefined
Home > @acoustic-content-sdk/schematics-utils > syncDir
syncDir() function
Signature:
export declare function syncDir(aSrc: string, aDst: string, aHost: Tree, aLogger?: Logger): Tree;
Parameters
Parameter | Type | Description |
---|---|---|
aSrc | string |
|
aDst | string |
|
aHost | Tree |
|
aLogger | Logger |
Returns:
Tree
Home > @acoustic-content-sdk/schematics-utils > targetBuildNotFoundError
targetBuildNotFoundError() function
Signature:
export declare function targetBuildNotFoundError(): SchematicsException;
Returns:
SchematicsException
Home > @acoustic-content-sdk/schematics-utils > updateField
updateField() function
Signature:
export declare function updateField(aName: string, aGenerator: Generator<string>, aObj: any): any;
Parameters
Parameter | Type | Description |
---|---|---|
aName | string |
|
aGenerator | Generator<string> |
|
aObj | any |
Returns:
any
Home > @acoustic-content-sdk/schematics-utils > updateMinVersion
updateMinVersion() function
Updates the package JSON to use at least the given version
Signature:
export declare function updateMinVersion(aName: string, aMinVersion: string, aPkg: any, aType?: DEP_TYPE): any;
Parameters
Parameter | Type | Description |
---|---|---|
aName | string |
name |
aMinVersion | string |
min version |
aPkg | any |
package |
aType | DEP_TYPE |
Returns:
any
Home > @acoustic-content-sdk/schematics-utils > updateWorkspace
updateWorkspace() function
Signature:
export declare function updateWorkspace(workspace: WorkspaceSchema): Rule;
Parameters
Parameter | Type | Description |
---|---|---|
workspace | WorkspaceSchema |
Returns:
Rule
Home > @acoustic-content-sdk/schematics-utils > validateApiUrl
validateApiUrl() function
Tests if the API URL is valid and if we have sufficient credentials to access the API
Signature:
export declare function validateApiUrl(aUrl: string, bValidateWithCredentials: boolean): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aUrl | string |
the API URL |
bValidateWithCredentials | boolean |
Returns:
Observable<string>
the url
Home > @acoustic-content-sdk/schematics-utils > validateCredentials
validateCredentials() function
Signature:
export declare function validateCredentials(aApiUrl: string, aCredentials: Credentials): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aApiUrl | string |
|
aCredentials | Credentials |
Returns:
Observable<string>
Home > @acoustic-content-sdk/schematics-utils > validateHtmlSelector
validateHtmlSelector() function
Signature:
export declare function validateHtmlSelector(selector: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
selector | string |
Returns:
void
Home > @acoustic-content-sdk/schematics-utils > validateName
validateName() function
Signature:
export declare function validateName(name: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
name | string |
Returns:
void
Home > @acoustic-content-sdk/schematics-utils > validateProjectName
validateProjectName() function
Signature:
export declare function validateProjectName(projectName: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
projectName | string |
Returns:
void
Home > @acoustic-content-sdk/schematics-utils > writeFilesOnTree
writeFilesOnTree() function
Returns an operator that writes all file descriptors to disk
Signature:
export declare function writeFilesOnTree<T>(aHost: Tree, aRoot?: Path): MonoTypeOperatorFunction<FileDescriptor<T>>;
Parameters
Parameter | Type | Description |
---|---|---|
aHost | Tree |
|
aRoot | Path |
the base of the target file system |
Returns:
MonoTypeOperatorFunction<FileDescriptor<T>>
the operator
Home > @acoustic-content-sdk/schematics-utils > AppConfig
AppConfig interface
Signature:
export interface AppConfig
Properties
Property | Type | Description |
---|---|---|
appRoot | string |
Directory where app files are placed. |
appShell |
{ app: string; route: string; }
|
|
assets |
(string | { glob?: string; input?: string; output?: string; })[]
|
List of application assets. |
baseHref | string |
Base url for the application being built. |
budgets |
{ type?: ('bundle' | 'initial' | 'allScript' | 'all' | 'anyScript' | 'any' | 'anyComponentStyle'); name?: string; baseline?: string; maximumWarning?: string; maximumError?: string; minimumWarning?: string; minimumError?: string; warning?: string; error?: string; }[]
|
|
deployUrl | string |
URL where files will be deployed. |
environments |
{ [name: string]: any; }
|
Name and corresponding file for environment config. |
environmentSource | string |
Source file for environment config. |
index | string |
The name of the start HTML file. |
main | string |
The name of the main entry-point file. |
name | string |
Name of the app. |
outDir | string |
The output directory for build results. |
platform | ('browser' | 'server') |
The runtime platform of the app. |
polyfills | string |
The name of the polyfills file. |
prefix | string |
The prefix to apply to generated selectors. |
root | string |
The root directory of the app. |
scripts |
(string | { input: string; [name: string]: any; })[]
|
Global scripts to be included in the build. |
serviceWorker | boolean |
Experimental support for a service worker from @angular/service-worker. |
stylePreprocessorOptions |
{ includePaths?: string[]; }
|
Options to pass to style preprocessors |
styles |
(string | { input?: string; [name: string]: any; })[]
|
Global styles to be included in the build. |
test | string |
The name of the test entry-point file. |
testTsconfig | string |
The name of the TypeScript configuration file for unit tests. |
tsconfig | string |
The name of the TypeScript configuration file. |
Home > @acoustic-content-sdk/schematics-utils > AppShellBuilderOptions
AppShellBuilderOptions interface
Signature:
export interface AppShellBuilderOptions
Properties
Property | Type | Description |
---|---|---|
browserTarget | string |
|
route | string |
|
serverTarget | string |
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderBaseOptions
BrowserBuilderBaseOptions interface
Signature:
export interface BrowserBuilderBaseOptions
Properties
Property | Type | Description |
---|---|---|
assets | (object | string)[] |
|
fileReplacements | FileReplacements[] |
|
index | string |
|
main | string |
|
outputPath | string |
|
polyfills | string |
|
scripts | (object | string)[] |
|
sourceMap | boolean |
|
styles | (object | string)[] |
|
tsConfig | string |
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions
BrowserBuilderOptions interface
Signature:
export interface BrowserBuilderOptions extends BrowserBuilderBaseOptions
Properties
Property | Type | Description |
---|---|---|
aot | boolean |
|
budgets |
{ type: string; maximumWarning?: string; maximumError?: string; }[]
|
|
buildOptimizer | boolean |
|
es5BrowserSupport | boolean |
|
extractCss | boolean |
|
extractLicenses | boolean |
|
namedChunks | boolean |
|
ngswConfigPath | string |
|
optimization | boolean |
|
outputHashing | OutputHashing |
|
resourcesOutputPath | string |
|
serviceWorker | boolean |
|
vendorChunk | boolean |
|
webWorkerTsConfig | string |
Home > @acoustic-content-sdk/schematics-utils > BuilderTarget
BuilderTarget interface
Signature:
export interface BuilderTarget<TBuilder extends Builders, TOptions>
Properties
Property | Type | Description |
---|---|---|
builder | TBuilder |
|
configurations |
{ production: Partial<TOptions>; [key: string]: Partial<TOptions>; }
|
|
options | TOptions |
Home > @acoustic-content-sdk/schematics-utils > Change
Change interface
Signature:
export interface Change
Properties
Property | Type | Description |
---|---|---|
description | string |
|
order | number |
|
path | string | null |
Methods
Method | Description |
---|---|
apply(host) |
Home > @acoustic-content-sdk/schematics-utils > CliConfig
CliConfig interface
Signature:
export interface CliConfig
Properties
Property | Type | Description |
---|---|---|
$schema | string |
|
apps | AppConfig[] |
Properties of the different applications in this project. |
defaults |
{ styleExt?: string; poll?: number; lintFix?: boolean; class?: { spec?: boolean; }; component?: { flat?: boolean; spec?: boolean; inlineStyle?: boolean; inlineTemplate?: boolean; viewEncapsulation?: ('Emulated' | 'Native' | 'None'); changeDetection?: ('Default' | 'OnPush'); }; directive?: { flat?: boolean; spec?: boolean; }; guard?: { flat?: boolean; spec?: boolean; }; interface?: { prefix?: string; }; module?: { flat?: boolean; spec?: boolean; }; pipe?: { flat?: boolean; spec?: boolean; }; service?: { flat?: boolean; spec?: boolean; }; build?: { sourcemaps?: boolean; baseHref?: string; progress?: boolean; poll?: number; deleteOutputPath?: boolean; preserveSymlinks?: boolean; showCircularDependencies?: boolean; commonChunk?: boolean; namedChunks?: boolean; }; serve?: { port?: number; host?: string; ssl?: boolean; sslKey?: string; sslCert?: string; proxyConfig?: string; }; schematics?: { collection?: string; newApp?: string; }; }
|
Specify the default values for generating. |
e2e |
{ protractor?: { config?: string; }; }
|
Configuration for end-to-end tests. |
lint |
{ files?: (string | string[]); project: string; tslintConfig?: string; exclude?: (string | string[]); }[]
|
Properties to be passed to TSLint. |
packageManager | ('npm' | 'cnpm' | 'yarn' | 'default') |
Specify which package manager tool to use. |
project |
{ name?: string; ejected?: boolean; }
|
The global configuration of the project. |
test |
{ karma?: { config?: string; }; codeCoverage?: { exclude?: string[]; }; }
|
Configuration for unit tests. |
warnings |
{ hmrWarning?: boolean; nodeDeprecation?: boolean; packageDeprecation?: boolean; versionMismatch?: boolean; typescriptMismatch?: boolean; }
|
Allow people to disable console warnings. |
Home > @acoustic-content-sdk/schematics-utils > E2EOptions
E2EOptions interface
Signature:
export interface E2EOptions
Properties
Property | Type | Description |
---|---|---|
devServerTarget | string |
|
protractorConfig | string |
Home > @acoustic-content-sdk/schematics-utils > ExtractI18nOptions
ExtractI18nOptions interface
Signature:
export interface ExtractI18nOptions
Properties
Property | Type | Description |
---|---|---|
browserTarget | string |
Home > @acoustic-content-sdk/schematics-utils > FileReplacements
FileReplacements interface
Signature:
export interface FileReplacements
Properties
Property | Type | Description |
---|---|---|
replace | string |
|
with | string |
Home > @acoustic-content-sdk/schematics-utils > Host
Host interface
Copyright Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file at https://angular.io/license
Signature:
export interface Host
Methods
Method | Description |
---|---|
read(path) | |
write(path, content) |
Home > @acoustic-content-sdk/schematics-utils > LibraryBuilderOptions
LibraryBuilderOptions interface
Signature:
export interface LibraryBuilderOptions
Properties
Property | Type | Description |
---|---|---|
project | string |
|
tsConfig | string |
Home > @acoustic-content-sdk/schematics-utils > LintBuilderOptions
LintBuilderOptions interface
Signature:
export interface LintBuilderOptions
Properties
Property | Type | Description |
---|---|---|
exclude | string[] |
|
tsConfig | string[] | string |
Home > @acoustic-content-sdk/schematics-utils > Location
Location interface
Signature:
export interface Location
Properties
Property | Type | Description |
---|---|---|
name | string |
|
path | Path |
Home > @acoustic-content-sdk/schematics-utils > ModuleOptions
ModuleOptions interface
Signature:
export interface ModuleOptions
Properties
Property | Type | Description |
---|---|---|
flat | boolean |
|
module | string |
|
moduleExt | string |
|
name | string |
|
path | string |
|
routingModuleExt | string |
|
skipImport | boolean |
Home > @acoustic-content-sdk/schematics-utils > NodeDependency
NodeDependency interface
Signature:
export interface NodeDependency
Properties
Property | Type | Description |
---|---|---|
name | string |
|
overwrite | boolean |
|
type | NodeDependencyType |
|
version | string |
Home > @acoustic-content-sdk/schematics-utils > ServeBuilderOptions
ServeBuilderOptions interface
Signature:
export interface ServeBuilderOptions
Properties
Property | Type | Description |
---|---|---|
browserTarget | string |
Home > @acoustic-content-sdk/schematics-utils > ServerBuilderOptions
ServerBuilderOptions interface
Signature:
export interface ServerBuilderOptions
Properties
Property | Type | Description |
---|---|---|
fileReplacements | FileReplacements[] |
|
main | string |
|
optimization |
{ scripts?: boolean; styles?: boolean; }
|
|
outputPath | string |
|
sourceMap | boolean |
|
tsConfig | string |
Home > @acoustic-content-sdk/schematics-utils > TestBuilderOptions
TestBuilderOptions interface
Signature:
export interface TestBuilderOptions extends Partial<BrowserBuilderBaseOptions>
Properties
Property | Type | Description |
---|---|---|
karmaConfig | string |
Home > @acoustic-content-sdk/schematics-utils > WorkspaceProject
WorkspaceProject interface
Signature:
export interface WorkspaceProject<TProjectType extends ProjectType = ProjectType.Application> extends experimental.workspace.WorkspaceProject
Properties
Property | Type | Description |
---|---|---|
architect | WorkspaceTargets<TProjectType> |
Tool options. |
projectType | ProjectType |
Project type. |
targets | WorkspaceTargets<TProjectType> |
Tool options. |
Home > @acoustic-content-sdk/schematics-utils > WorkspaceSchema
WorkspaceSchema interface
Signature:
export interface WorkspaceSchema extends experimental.workspace.WorkspaceSchema
Properties
Property | Type | Description |
---|---|---|
projects |
{ [key: string]: WorkspaceProject<ProjectType.Application | ProjectType.Library>; }
|
Home > @acoustic-content-sdk/schematics-utils > WorkspaceTargets
WorkspaceTargets interface
Signature:
export interface WorkspaceTargets<TProjectType extends ProjectType = ProjectType.Application>
Properties
Property | Type | Description |
---|---|---|
"app-shell" | AppShellBuilderTarget |
|
"extract-i18n" | ExtractI18nBuilderTarget |
|
build | TProjectType extends ProjectType.Library ? LibraryBuilderTarget : BrowserBuilderTarget |
|
e2e | E2EBuilderTarget |
|
lint | LintBuilderTarget |
|
serve | ServeBuilderTarget |
|
server | ServerBuilderTarget |
|
test | TestBuilderTarget |
Home > @acoustic-content-sdk/schematics-utils > ZipEntry
ZipEntry interface
Signature:
export interface ZipEntry
Properties
Property | Type | Description |
---|---|---|
data | Buffer |
|
fileName | string |
Home > @acoustic-content-sdk/schematics-utils > ajaxRequest
ajaxRequest variable
Signature:
ajaxRequest: (req: AjaxRequest) => Observable<string>
Home > @acoustic-content-sdk/schematics-utils > configPath
configPath variable
Signature:
configPath = "/.angular-cli.json"
Home > @acoustic-content-sdk/schematics-utils > createXHR
createXHR variable
Signature:
createXHR: () => any
Home > @acoustic-content-sdk/schematics-utils > htmlSelectorRe
htmlSelectorRe variable
Signature:
htmlSelectorRe: RegExp
Home > @acoustic-content-sdk/schematics-utils > MODULE_EXT
MODULE_EXT variable
Signature:
MODULE_EXT = ".module.ts"
Home > @acoustic-content-sdk/schematics-utils > NOOP_LOGGER
NOOP_LOGGER variable
Signature:
NOOP_LOGGER: Logger
Home > @acoustic-content-sdk/schematics-utils > ROUTING_MODULE_EXT
ROUTING_MODULE_EXT variable
Signature:
ROUTING_MODULE_EXT = "-routing.module.ts"
Home > @acoustic-content-sdk/schematics-utils > rxDeleteFile
rxDeleteFile variable
Signature:
rxDeleteFile: <T extends PathLike>(path: T) => Observable<T>
Home > @acoustic-content-sdk/schematics-utils > rxReadTextFile
rxReadTextFile variable
Signature:
rxReadTextFile: (path: string | number | Buffer | import("url").URL) => Observable<string>
Home > @acoustic-content-sdk/schematics-utils > rxReadZip
rxReadZip variable
Export the function to extract a zip file
Signature:
rxReadZip: typeof _rxOpenZip
Home > @acoustic-content-sdk/schematics-utils > rxTmpFile
rxTmpFile variable
Signature:
rxTmpFile: Observable<string>
Home > @acoustic-content-sdk/schematics-utils > rxUnlink
rxUnlink variable
Signature:
rxUnlink: (path: PathLike) => Observable<void>
Home > @acoustic-content-sdk/schematics-utils > TENANT_BASED_URL_REGEXP
TENANT_BASED_URL_REGEXP variable
Signature:
TENANT_BASED_URL_REGEXP: RegExp
Home > @acoustic-content-sdk/schematics-utils > VERSION
VERSION variable
Version and build number of the package
Signature:
VERSION: {
version: {
major: string;
minor: string;
patch: string;
branch: string;
};
build: Date;
}
Home > @acoustic-content-sdk/schematics-utils > WCHTOOLS_DEPENDENCIES
WCHTOOLS_DEPENDENCIES variable
Signature:
WCHTOOLS_DEPENDENCIES = "wchtools-dependencies"
Home > @acoustic-content-sdk/schematics-utils > writeBufferOnTree
writeBufferOnTree variable
Constructs a WriteTextFile on top of a host
Signature:
writeBufferOnTree: (aHost: Tree, aRoot?: Path) => WriteBuffer
Home > @acoustic-content-sdk/schematics-utils > writeTextFileOnTree
writeTextFileOnTree variable
Constructs a WriteTextFile on top of a host
Signature:
writeTextFileOnTree: (aHost: Tree, aRoot?: Path) => WriteTextFile
Home > @acoustic-content-sdk/schematics-utils > AppShellBuilderTarget
AppShellBuilderTarget type
Signature:
export declare type AppShellBuilderTarget = BuilderTarget<Builders.AppShell, AppShellBuilderOptions>;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderTarget
BrowserBuilderTarget type
Signature:
export declare type BrowserBuilderTarget = BuilderTarget<Builders.Browser, BrowserBuilderOptions>;
Home > @acoustic-content-sdk/schematics-utils > E2EBuilderTarget
E2EBuilderTarget type
Signature:
export declare type E2EBuilderTarget = BuilderTarget<Builders.Protractor, E2EOptions>;
Home > @acoustic-content-sdk/schematics-utils > ExtractI18nBuilderTarget
ExtractI18nBuilderTarget type
Signature:
export declare type ExtractI18nBuilderTarget = BuilderTarget<Builders.ExtractI18n, ExtractI18nOptions>;
Home > @acoustic-content-sdk/schematics-utils > LibraryBuilderTarget
LibraryBuilderTarget type
Signature:
export declare type LibraryBuilderTarget = BuilderTarget<Builders.NgPackagr, LibraryBuilderOptions>;
Home > @acoustic-content-sdk/schematics-utils > LintBuilderTarget
LintBuilderTarget type
Signature:
export declare type LintBuilderTarget = BuilderTarget<Builders.TsLint, LintBuilderOptions>;
Home > @acoustic-content-sdk/schematics-utils > OutputHashing
OutputHashing type
Signature:
export declare type OutputHashing = 'all' | 'media' | 'none' | 'bundles';
Home > @acoustic-content-sdk/schematics-utils > ServeBuilderTarget
ServeBuilderTarget type
Signature:
export declare type ServeBuilderTarget = BuilderTarget<Builders.DevServer, ServeBuilderOptions>;
Home > @acoustic-content-sdk/schematics-utils > ServerBuilderTarget
ServerBuilderTarget type
Signature:
export declare type ServerBuilderTarget = BuilderTarget<Builders.Server, ServerBuilderOptions>;
Home > @acoustic-content-sdk/schematics-utils > TestBuilderTarget
TestBuilderTarget type
Signature:
export declare type TestBuilderTarget = BuilderTarget<Builders.Karma, TestBuilderOptions>;
Home > @acoustic-content-sdk/schematics-utils > TransformCallback
TransformCallback type
Signature:
export declare type TransformCallback<T> = TransformWithPath<T> | TransformWithoutPath<T>;
Home > @acoustic-content-sdk/schematics-utils > TransformWithoutPath
TransformWithoutPath type
Signature:
export declare type TransformWithoutPath<T> = (aSource: T | undefined) => Observable<T | undefined>;
Home > @acoustic-content-sdk/schematics-utils > TransformWithPath
TransformWithPath type
Signature:
export declare type TransformWithPath<T> = (aSource: T | undefined, aPath: string) => Observable<T | undefined>;
Home > @acoustic-content-sdk/schematics-utils > NoopChange > description
NoopChange.description property
Signature:
description: string;
Home > @acoustic-content-sdk/schematics-utils > NoopChange > order
NoopChange.order property
Signature:
order: number;
Home > @acoustic-content-sdk/schematics-utils > NoopChange > path
NoopChange.path property
Signature:
path: any;
Home > @acoustic-content-sdk/schematics-utils > NoopChange > apply
NoopChange.apply() method
Signature:
apply(): Promise<void>;
Returns:
Promise<void>
Home > @acoustic-content-sdk/schematics-utils > RemoveChange > (constructor)
RemoveChange.(constructor)
Constructs a new instance of the RemoveChange
class
Signature:
constructor(path: string, pos: number, toRemove: string);
Parameters
Parameter | Type | Description |
---|---|---|
path | string |
|
pos | number |
|
toRemove | string |
Home > @acoustic-content-sdk/schematics-utils > RemoveChange > description
RemoveChange.description property
Signature:
description: string;
Home > @acoustic-content-sdk/schematics-utils > RemoveChange > order
RemoveChange.order property
Signature:
order: number;
Home > @acoustic-content-sdk/schematics-utils > RemoveChange > path
RemoveChange.path property
Signature:
path: string;
Home > @acoustic-content-sdk/schematics-utils > RemoveChange > apply
RemoveChange.apply() method
Signature:
apply(host: Host): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
host | Host |
Returns:
Promise<void>
Home > @acoustic-content-sdk/schematics-utils > InsertChange > (constructor)
InsertChange.(constructor)
Constructs a new instance of the InsertChange
class
Signature:
constructor(path: string, pos: number, toAdd: string);
Parameters
Parameter | Type | Description |
---|---|---|
path | string |
|
pos | number |
|
toAdd | string |
Home > @acoustic-content-sdk/schematics-utils > InsertChange > description
InsertChange.description property
Signature:
description: string;
Home > @acoustic-content-sdk/schematics-utils > InsertChange > order
InsertChange.order property
Signature:
order: number;
Home > @acoustic-content-sdk/schematics-utils > InsertChange > path
InsertChange.path property
Signature:
path: string;
Home > @acoustic-content-sdk/schematics-utils > InsertChange > pos
InsertChange.pos property
Signature:
pos: number;
Home > @acoustic-content-sdk/schematics-utils > InsertChange > toAdd
InsertChange.toAdd property
Signature:
toAdd: string;
Home > @acoustic-content-sdk/schematics-utils > InsertChange > apply
InsertChange.apply() method
This method does not insert spaces if there is none in the original string.
Signature:
apply(host: Host): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
host | Host |
Returns:
Promise<void>
Home > @acoustic-content-sdk/schematics-utils > ReplaceChange > (constructor)
ReplaceChange.(constructor)
Constructs a new instance of the ReplaceChange
class
Signature:
constructor(path: string, pos: number, oldText: string, newText: string);
Parameters
Parameter | Type | Description |
---|---|---|
path | string |
|
pos | number |
|
oldText | string |
|
newText | string |
Home > @acoustic-content-sdk/schematics-utils > ReplaceChange > description
ReplaceChange.description property
Signature:
description: string;
Home > @acoustic-content-sdk/schematics-utils > ReplaceChange > order
ReplaceChange.order property
Signature:
order: number;
Home > @acoustic-content-sdk/schematics-utils > ReplaceChange > path
ReplaceChange.path property
Signature:
path: string;
Home > @acoustic-content-sdk/schematics-utils > ReplaceChange > apply
ReplaceChange.apply() method
Signature:
apply(host: Host): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
host | Host |
Returns:
Promise<void>
Home > @acoustic-content-sdk/schematics-utils > AppConfig > appRoot
AppConfig.appRoot property
Directory where app files are placed.
Signature:
appRoot?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > appShell
AppConfig.appShell property
Signature:
appShell?: {
app: string;
route: string;
};
Home > @acoustic-content-sdk/schematics-utils > AppConfig > assets
AppConfig.assets property
List of application assets.
Signature:
assets?: (string | {
glob?: string;
input?: string;
output?: string;
})[];
Home > @acoustic-content-sdk/schematics-utils > AppConfig > baseHref
AppConfig.baseHref property
Base url for the application being built.
Signature:
baseHref?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > budgets
AppConfig.budgets property
Signature:
budgets?: {
type?: ('bundle' | 'initial' | 'allScript' | 'all' | 'anyScript' | 'any' | 'anyComponentStyle');
name?: string;
baseline?: string;
maximumWarning?: string;
maximumError?: string;
minimumWarning?: string;
minimumError?: string;
warning?: string;
error?: string;
}[];
Home > @acoustic-content-sdk/schematics-utils > AppConfig > deployUrl
AppConfig.deployUrl property
URL where files will be deployed.
Signature:
deployUrl?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > environments
AppConfig.environments property
Name and corresponding file for environment config.
Signature:
environments?: {
[name: string]: any;
};
Home > @acoustic-content-sdk/schematics-utils > AppConfig > environmentSource
AppConfig.environmentSource property
Source file for environment config.
Signature:
environmentSource?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > index
AppConfig.index property
The name of the start HTML file.
Signature:
index?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > main
AppConfig.main property
The name of the main entry-point file.
Signature:
main?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > name
AppConfig.name property
Name of the app.
Signature:
name?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > outDir
AppConfig.outDir property
The output directory for build results.
Signature:
outDir?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > platform
AppConfig.platform property
The runtime platform of the app.
Signature:
platform?: ('browser' | 'server');
Home > @acoustic-content-sdk/schematics-utils > AppConfig > polyfills
AppConfig.polyfills property
The name of the polyfills file.
Signature:
polyfills?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > prefix
AppConfig.prefix property
The prefix to apply to generated selectors.
Signature:
prefix?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > root
AppConfig.root property
The root directory of the app.
Signature:
root?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > scripts
AppConfig.scripts property
Global scripts to be included in the build.
Signature:
scripts?: (string | {
input: string;
[name: string]: any;
})[];
Home > @acoustic-content-sdk/schematics-utils > AppConfig > serviceWorker
AppConfig.serviceWorker property
Experimental support for a service worker from @angular/service-worker.
Signature:
serviceWorker?: boolean;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > stylePreprocessorOptions
AppConfig.stylePreprocessorOptions property
Options to pass to style preprocessors
Signature:
stylePreprocessorOptions?: {
includePaths?: string[];
};
Home > @acoustic-content-sdk/schematics-utils > AppConfig > styles
AppConfig.styles property
Global styles to be included in the build.
Signature:
styles?: (string | {
input?: string;
[name: string]: any;
})[];
Home > @acoustic-content-sdk/schematics-utils > AppConfig > test
AppConfig.test property
The name of the test entry-point file.
Signature:
test?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > testTsconfig
AppConfig.testTsconfig property
The name of the TypeScript configuration file for unit tests.
Signature:
testTsconfig?: string;
Home > @acoustic-content-sdk/schematics-utils > AppConfig > tsconfig
AppConfig.tsconfig property
The name of the TypeScript configuration file.
Signature:
tsconfig?: string;
Home > @acoustic-content-sdk/schematics-utils > AppShellBuilderOptions > browserTarget
AppShellBuilderOptions.browserTarget property
Signature:
browserTarget: string;
Home > @acoustic-content-sdk/schematics-utils > AppShellBuilderOptions > route
AppShellBuilderOptions.route property
Signature:
route: string;
Home > @acoustic-content-sdk/schematics-utils > AppShellBuilderOptions > serverTarget
AppShellBuilderOptions.serverTarget property
Signature:
serverTarget: string;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > aot
BrowserBuilderOptions.aot property
Signature:
aot?: boolean;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > budgets
BrowserBuilderOptions.budgets property
Signature:
budgets?: {
type: string;
maximumWarning?: string;
maximumError?: string;
}[];
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > buildOptimizer
BrowserBuilderOptions.buildOptimizer property
Signature:
buildOptimizer?: boolean;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > es5BrowserSupport
BrowserBuilderOptions.es5BrowserSupport property
Signature:
es5BrowserSupport?: boolean;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > extractCss
BrowserBuilderOptions.extractCss property
Signature:
extractCss?: boolean;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > extractLicenses
BrowserBuilderOptions.extractLicenses property
Signature:
extractLicenses?: boolean;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > namedChunks
BrowserBuilderOptions.namedChunks property
Signature:
namedChunks?: boolean;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > ngswConfigPath
BrowserBuilderOptions.ngswConfigPath property
Signature:
ngswConfigPath?: string;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > optimization
BrowserBuilderOptions.optimization property
Signature:
optimization?: boolean;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > outputHashing
BrowserBuilderOptions.outputHashing property
Signature:
outputHashing?: OutputHashing;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > resourcesOutputPath
BrowserBuilderOptions.resourcesOutputPath property
Signature:
resourcesOutputPath?: string;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > serviceWorker
BrowserBuilderOptions.serviceWorker property
Signature:
serviceWorker?: boolean;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > vendorChunk
BrowserBuilderOptions.vendorChunk property
Signature:
vendorChunk?: boolean;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderOptions > webWorkerTsConfig
BrowserBuilderOptions.webWorkerTsConfig property
Signature:
webWorkerTsConfig?: string;
Home > @acoustic-content-sdk/schematics-utils > BuilderTarget > builder
BuilderTarget.builder property
Signature:
builder: TBuilder;
Home > @acoustic-content-sdk/schematics-utils > BuilderTarget > configurations
BuilderTarget.configurations property
Signature:
configurations?: {
production: Partial<TOptions>;
[key: string]: Partial<TOptions>;
};
Home > @acoustic-content-sdk/schematics-utils > BuilderTarget > options
BuilderTarget.options property
Signature:
options: TOptions;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderBaseOptions > assets
BrowserBuilderBaseOptions.assets property
Signature:
assets?: (object | string)[];
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderBaseOptions > fileReplacements
BrowserBuilderBaseOptions.fileReplacements property
Signature:
fileReplacements?: FileReplacements[];
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderBaseOptions > index
BrowserBuilderBaseOptions.index property
Signature:
index?: string;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderBaseOptions > main
BrowserBuilderBaseOptions.main property
Signature:
main: string;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderBaseOptions > outputPath
BrowserBuilderBaseOptions.outputPath property
Signature:
outputPath?: string;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderBaseOptions > polyfills
BrowserBuilderBaseOptions.polyfills property
Signature:
polyfills: string;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderBaseOptions > scripts
BrowserBuilderBaseOptions.scripts property
Signature:
scripts?: (object | string)[];
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderBaseOptions > sourceMap
BrowserBuilderBaseOptions.sourceMap property
Signature:
sourceMap?: boolean;
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderBaseOptions > styles
BrowserBuilderBaseOptions.styles property
Signature:
styles?: (object | string)[];
Home > @acoustic-content-sdk/schematics-utils > BrowserBuilderBaseOptions > tsConfig
BrowserBuilderBaseOptions.tsConfig property
Signature:
tsConfig: string;
Home > @acoustic-content-sdk/schematics-utils > Change > description
Change.description property
Signature:
readonly description: string;
Home > @acoustic-content-sdk/schematics-utils > Change > order
Change.order property
Signature:
readonly order: number;
Home > @acoustic-content-sdk/schematics-utils > Change > path
Change.path property
Signature:
readonly path: string | null;
Home > @acoustic-content-sdk/schematics-utils > Change > apply
Change.apply() method
Signature:
apply(host: Host): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
host | Host |
Returns:
Promise<void>
Home > @acoustic-content-sdk/schematics-utils > CliConfig > $schema
CliConfig.$schema property
Signature:
$schema?: string;
Home > @acoustic-content-sdk/schematics-utils > CliConfig > apps
CliConfig.apps property
Properties of the different applications in this project.
Signature:
apps?: AppConfig[];
Home > @acoustic-content-sdk/schematics-utils > CliConfig > defaults
CliConfig.defaults property
Specify the default values for generating.
Signature:
defaults?: {
styleExt?: string;
poll?: number;
lintFix?: boolean;
class?: {
spec?: boolean;
};
component?: {
flat?: boolean;
spec?: boolean;
inlineStyle?: boolean;
inlineTemplate?: boolean;
viewEncapsulation?: ('Emulated' | 'Native' | 'None');
changeDetection?: ('Default' | 'OnPush');
};
directive?: {
flat?: boolean;
spec?: boolean;
};
guard?: {
flat?: boolean;
spec?: boolean;
};
interface?: {
prefix?: string;
};
module?: {
flat?: boolean;
spec?: boolean;
};
pipe?: {
flat?: boolean;
spec?: boolean;
};
service?: {
flat?: boolean;
spec?: boolean;
};
build?: {
sourcemaps?: boolean;
baseHref?: string;
progress?: boolean;
poll?: number;
deleteOutputPath?: boolean;
preserveSymlinks?: boolean;
showCircularDependencies?: boolean;
commonChunk?: boolean;
namedChunks?: boolean;
};
serve?: {
port?: number;
host?: string;
ssl?: boolean;
sslKey?: string;
sslCert?: string;
proxyConfig?: string;
};
schematics?: {
collection?: string;
newApp?: string;
};
};
Home > @acoustic-content-sdk/schematics-utils > CliConfig > e2e
CliConfig.e2e property
Configuration for end-to-end tests.
Signature:
e2e?: {
protractor?: {
config?: string;
};
};
Home > @acoustic-content-sdk/schematics-utils > CliConfig > lint
CliConfig.lint property
Properties to be passed to TSLint.
Signature:
lint?: {
files?: (string | string[]);
project: string;
tslintConfig?: string;
exclude?: (string | string[]);
}[];
Home > @acoustic-content-sdk/schematics-utils > CliConfig > packageManager
CliConfig.packageManager property
Specify which package manager tool to use.
Signature:
packageManager?: ('npm' | 'cnpm' | 'yarn' | 'default');
Home > @acoustic-content-sdk/schematics-utils > CliConfig > project
CliConfig.project property
The global configuration of the project.
Signature:
project?: {
name?: string;
ejected?: boolean;
};
Home > @acoustic-content-sdk/schematics-utils > CliConfig > test
CliConfig.test property
Configuration for unit tests.
Signature:
test?: {
karma?: {
config?: string;
};
codeCoverage?: {
exclude?: string[];
};
};
Home > @acoustic-content-sdk/schematics-utils > CliConfig > warnings
CliConfig.warnings property
Allow people to disable console warnings.
Signature:
warnings?: {
hmrWarning?: boolean;
nodeDeprecation?: boolean;
packageDeprecation?: boolean;
versionMismatch?: boolean;
typescriptMismatch?: boolean;
};
Home > @acoustic-content-sdk/schematics-utils > E2EOptions > devServerTarget
E2EOptions.devServerTarget property
Signature:
devServerTarget: string;
Home > @acoustic-content-sdk/schematics-utils > E2EOptions > protractorConfig
E2EOptions.protractorConfig property
Signature:
protractorConfig: string;
Home > @acoustic-content-sdk/schematics-utils > ExtractI18nOptions > browserTarget
ExtractI18nOptions.browserTarget property
Signature:
browserTarget: string;
Home > @acoustic-content-sdk/schematics-utils > Host > read
Host.read() method
Signature:
read(path: string): Promise<string>;
Parameters
Parameter | Type | Description |
---|---|---|
path | string |
Returns:
Promise<string>
Home > @acoustic-content-sdk/schematics-utils > Host > write
Host.write() method
Signature:
write(path: string, content: string): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
path | string |
|
content | string |
Returns:
Promise<void>
Home > @acoustic-content-sdk/schematics-utils > FileReplacements > replace
FileReplacements.replace property
Signature:
replace: string;
Home > @acoustic-content-sdk/schematics-utils > FileReplacements > with
FileReplacements.with property
Signature:
with: string;
Home > @acoustic-content-sdk/schematics-utils > LibraryBuilderOptions > project
LibraryBuilderOptions.project property
Signature:
project: string;
Home > @acoustic-content-sdk/schematics-utils > LibraryBuilderOptions > tsConfig
LibraryBuilderOptions.tsConfig property
Signature:
tsConfig: string;
Home > @acoustic-content-sdk/schematics-utils > LintBuilderOptions > exclude
LintBuilderOptions.exclude property
Signature:
exclude?: string[];
Home > @acoustic-content-sdk/schematics-utils > LintBuilderOptions > tsConfig
LintBuilderOptions.tsConfig property
Signature:
tsConfig: string[] | string;
Home > @acoustic-content-sdk/schematics-utils > ModuleOptions > flat
ModuleOptions.flat property
Signature:
flat?: boolean;
Home > @acoustic-content-sdk/schematics-utils > ModuleOptions > module
ModuleOptions.module property
Signature:
module?: string;
Home > @acoustic-content-sdk/schematics-utils > ModuleOptions > moduleExt
ModuleOptions.moduleExt property
Signature:
moduleExt?: string;
Home > @acoustic-content-sdk/schematics-utils > ModuleOptions > name
ModuleOptions.name property
Signature:
name: string;
Home > @acoustic-content-sdk/schematics-utils > ModuleOptions > path
ModuleOptions.path property
Signature:
path?: string;
Home > @acoustic-content-sdk/schematics-utils > ModuleOptions > routingModuleExt
ModuleOptions.routingModuleExt property
Signature:
routingModuleExt?: string;
Home > @acoustic-content-sdk/schematics-utils > ModuleOptions > skipImport
ModuleOptions.skipImport property
Signature:
skipImport?: boolean;
Home > @acoustic-content-sdk/schematics-utils > Location > name
Location.name property
Signature:
name: string;
Home > @acoustic-content-sdk/schematics-utils > Location > path
Location.path property
Signature:
path: Path;
Home > @acoustic-content-sdk/schematics-utils > NodeDependency > name
NodeDependency.name property
Signature:
name: string;
Home > @acoustic-content-sdk/schematics-utils > NodeDependency > overwrite
NodeDependency.overwrite property
Signature:
overwrite?: boolean;
Home > @acoustic-content-sdk/schematics-utils > NodeDependency > type
NodeDependency.type property
Signature:
type: NodeDependencyType;
Home > @acoustic-content-sdk/schematics-utils > NodeDependency > version
NodeDependency.version property
Signature:
version: string;
Home > @acoustic-content-sdk/schematics-utils > ServeBuilderOptions > browserTarget
ServeBuilderOptions.browserTarget property
Signature:
browserTarget: string;
Home > @acoustic-content-sdk/schematics-utils > ServerBuilderOptions > fileReplacements
ServerBuilderOptions.fileReplacements property
Signature:
fileReplacements?: FileReplacements[];
Home > @acoustic-content-sdk/schematics-utils > ServerBuilderOptions > main
ServerBuilderOptions.main property
Signature:
main: string;
Home > @acoustic-content-sdk/schematics-utils > ServerBuilderOptions > optimization
ServerBuilderOptions.optimization property
Signature:
optimization?: {
scripts?: boolean;
styles?: boolean;
};
Home > @acoustic-content-sdk/schematics-utils > ServerBuilderOptions > outputPath
ServerBuilderOptions.outputPath property
Signature:
outputPath: string;
Home > @acoustic-content-sdk/schematics-utils > ServerBuilderOptions > sourceMap
ServerBuilderOptions.sourceMap property
Signature:
sourceMap?: boolean;
Home > @acoustic-content-sdk/schematics-utils > ServerBuilderOptions > tsConfig
ServerBuilderOptions.tsConfig property
Signature:
tsConfig: string;
Home > @acoustic-content-sdk/schematics-utils > TestBuilderOptions > karmaConfig
TestBuilderOptions.karmaConfig property
Signature:
karmaConfig: string;
Home > @acoustic-content-sdk/schematics-utils > WorkspaceProject > architect
WorkspaceProject.architect property
Tool options.
Signature:
architect?: WorkspaceTargets<TProjectType>;
Home > @acoustic-content-sdk/schematics-utils > WorkspaceProject > projectType
WorkspaceProject.projectType property
Project type.
Signature:
projectType: ProjectType;
Home > @acoustic-content-sdk/schematics-utils > WorkspaceProject > targets
WorkspaceProject.targets property
Tool options.
Signature:
targets?: WorkspaceTargets<TProjectType>;
Home > @acoustic-content-sdk/schematics-utils > WorkspaceSchema > projects
WorkspaceSchema.projects property
Signature:
projects: {
[key: string]: WorkspaceProject<ProjectType.Application | ProjectType.Library>;
};
Home > @acoustic-content-sdk/schematics-utils > WorkspaceTargets > "app-shell"
WorkspaceTargets."app-shell" property
Signature:
'app-shell'?: AppShellBuilderTarget;
Home > @acoustic-content-sdk/schematics-utils > WorkspaceTargets > "extract-i18n"
WorkspaceTargets."extract-i18n" property
Signature:
'extract-i18n'?: ExtractI18nBuilderTarget;
Home > @acoustic-content-sdk/schematics-utils > WorkspaceTargets > build
WorkspaceTargets.build property
Signature:
build?: TProjectType extends ProjectType.Library ? LibraryBuilderTarget : BrowserBuilderTarget;
Home > @acoustic-content-sdk/schematics-utils > WorkspaceTargets > e2e
WorkspaceTargets.e2e property
Signature:
e2e?: E2EBuilderTarget;
Home > @acoustic-content-sdk/schematics-utils > WorkspaceTargets > lint
WorkspaceTargets.lint property
Signature:
lint?: LintBuilderTarget;
Home > @acoustic-content-sdk/schematics-utils > WorkspaceTargets > serve
WorkspaceTargets.serve property
Signature:
serve?: ServeBuilderTarget;
Home > @acoustic-content-sdk/schematics-utils > WorkspaceTargets > server
WorkspaceTargets.server property
Signature:
server?: ServerBuilderTarget;
Home > @acoustic-content-sdk/schematics-utils > WorkspaceTargets > test
WorkspaceTargets.test property
Signature:
test?: TestBuilderTarget;
Home > @acoustic-content-sdk/schematics-utils > ZipEntry > data
ZipEntry.data property
Signature:
data: Buffer;
Home > @acoustic-content-sdk/schematics-utils > ZipEntry > fileName
ZipEntry.fileName property
Signature:
fileName: string;