@acoustic-content-sdk/tooling 中文文档教程
用于工具的实用方法的实现。
Home > @acoustic-content-sdk/tooling
tooling package
用于工具的实用方法的实现。
Enumerations
Enumeration | Description |
---|---|
ProjectType |
Functions
Function | Description |
---|---|
acceptJsonFile(aFile) | Tests if a file is either a directory or a JSON file |
addToWchToolsDependencies(aDeps, aPkg) | |
blackWhiteList(aInclude, aExclude) | |
bufferToIdentifier(aBuffer) | Converts a buffer to an identifier string |
canHaveLayout(aType) | |
canonicalizeAssets(options) | |
canonicalizeJson(aData) | Performs an inplace canonicalization of a JSON object |
createFileDescriptor(aName, aValue) | |
createGuid(aId, aSecret) | Constructs a GUID in a reproducible way from an ID |
createGuidFromBuffer(aBuffer) | Constructs a GUID in a reproducible way from an ID |
createReadDirectory(aRoot) | |
createRevision(aObj, aSecret) | |
createTypePredicate(aOptions) | |
ensureDirPath(aDir) | |
ensureLeadingSlash(aUrl) | |
ensureTrailingSlash(aUrl) | |
findSdkVersion(aReadFile) | Locates the SDK version |
findSdkVersionFromPkg(aPackage) | Locates the SDK version |
generateDataOverlay(aOptions) | Generates a stream of files for all wchtools data folders references by the addressed module. |
generateKeys(options) | |
generateLayout(options) | |
generateLayouts(options) | |
getOrganization(aPackageName) | Extracts the organization from a package name |
hasTrailingSlash(aUrl) | |
isFileDescriptor(aValue) | Tests if an item is a file descriptor |
logFileDescriptor() | |
relativePath(aSrc, aDst) | |
rxFindAuthoringAssets(aRoot, aTree) | Reads the authoring assets from a directory |
rxFindAuthoringContent(aRoot, aTree) | Reads the authoring types from a directory |
rxFindAuthoringLayoutMappings(aRoot, aTree) | Reads the authoring layouts from a directory |
rxFindAuthoringLayouts(aRoot, aTree) | Reads the authoring layouts from a directory |
rxFindAuthoringTypes(aRoot, aTree) | Reads the authoring types from a directory |
rxFindDataDir(host, options) | |
rxFindPackageJson(aDir, aReadFile) | Loads the package JSON file relative to the directory |
rxFindProject(workspaceOrHost, options) | Locates the workspace project, either from the configured project name, else falls back to the default project |
rxFindProjectName(workspaceOrHost, options) | Locates the workspace project, either from the configured project name, else falls back to the default project |
rxFindWchToolsOptions(host, options) | |
rxGetDependencies(aReadText, aRoot) | Lists all node dependencies of the module |
rxGetWorkspace(aReadText) | |
rxGetWorkspacePath(aReadText) | |
rxLocateRootDir(aBaseDir) | Locates the application root directory based on the working directory |
rxReadAuthoringContent(aRoot, aTree) | Reads the authoring content from a directory |
rxReadAuthoringLayoutMappings(aRoot, aTree) | Reads the authoring layouts from a directory |
rxReadAuthoringLayouts(aRoot, aTree) | Reads the authoring layouts from a directory |
rxReadAuthoringTypes(aRoot, aTree) | Reads the authoring types from a directory |
rxReadBuffer(aFile, aHost) | Reads a JSON file on top of a text callback |
rxReadDir(aBaseDir, aAccept) | Reads all files in the directory and all of its (accepted) subdirectories |
rxReadJsonFile(aFile, aHost) | Reads a JSON file on top of a text callback |
rxWchToolsManifest(aName) | Creates an operator that converts a sequence of files into a manifest |
rxWriteJsonFile(aName, aValue, aHost) | Persist a JSON file |
selectOptionsForTarget(aTarget, aConfiguration) | Returns a selector function that selects the configuration options for a target |
serializeJson(aData) | |
wchToolsCleanup(aItem) | |
wchToolsFileDescriptor(aItem) | Constructs a file descriptor from the item |
writeFiles(aRoot, aOverride) | Returns an operator that writes all file descriptors to disk |
Interfaces
Interface | Description |
---|---|
DataOverlaySchema | |
JsonEntry | |
ReadDirectoryEntry | File descriptor |
WorkspaceProject | |
WorkspaceSchema |
Variables
Variable | Description |
---|---|
anyToBuffer | Converts an arbitrary value into a buffer |
camelCase | |
classCase | |
constantCase | |
createChalkLoggerService | Constructs a chalk based logger |
createReadBuffer | Constructs the read buffer callback |
createReadTextFile | Constructs the read text file callback |
dotCase | |
fixPath | Make sure the path starts with a slash |
kebabCase | |
readTextFile | Generates a ReadTextFile function on top of a ReadBuffer function |
rxDataDirectory | Creates an RX operator that locates data directories in the packages |
rxExists | Tests if a file exists |
rxWriteFileDescriptor | Persists a file descriptor |
TYPE_SUFFIX | |
TYPES_FOLDER | |
WCHTOOLS_DEPENDENCIES | |
WCHTOOLS_FOLDER_ASSET | |
WCHTOOLS_FOLDER_CONTENT_TYPE | |
WCHTOOLS_FOLDER_CONTENT | |
WCHTOOLS_FOLDER_LAYOUT_MAPPING | |
WCHTOOLS_FOLDER_LAYOUT | |
wchToolsGetCredentials | |
writeTextFile | Creates a WriteTextFile function on top of a WriteBuffer function |
Type Aliases
Type Alias | Description |
---|---|
AuthoringItem | |
FileDescriptor | File descriptor, first element is path, second is content |
JsonEntryMap | |
PackageJson | |
ReadBuffer | |
ReadDirectory | Function type to read a directory |
ReadTextFile | |
WriteBuffer | |
WriteTextFile |
Home > @acoustic-content-sdk/tooling > ProjectType
ProjectType enum
Signature:
export declare enum ProjectType
Enumeration Members
Member | Value | Description |
---|---|---|
Application | "application" |
|
Library | "library" |
Home > ; @acoustic-content-sdk/tooling > acceptJsonFile
acceptJsonFile() function
测试文件是目录还是 JSON 文件
签名:
export declare function acceptJsonFile(aFile: ReadDirectoryEntry): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
aFile | ReadDirectoryEntry |
the descriptor |
返回:
boolean
true if we accept the file or directory
Home > @acoustic-content-sdk/tooling > addToWchToolsDependencies
addToWchToolsDependencies() function
Signature:
export declare function addToWchToolsDependencies(aDeps: string[], aPkg: any): void;
Parameters
Parameter | Type | Description |
---|---|---|
aDeps | string[] |
|
aPkg | any |
Returns:
void
主页 > @acoustic-content-sdk/tooling > blackWhiteList
blackWhiteList() function
Signature:
export declare function blackWhiteList(aInclude?: string[], aExclude?: string[]): Predicate<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aInclude | string[] |
|
aExclude | string[] |
Returns:
Predicate
主页 > @acoustic-content-sdk/tooling > bufferToIdentifier
bufferToIdentifier() function
将缓冲区转换为标识符字符串
签名:
export declare function bufferToIdentifier(aBuffer: Uint8Array): string;
Parameters
Parameter | Type | Description |
---|---|---|
aBuffer | Uint8Array |
the buffer |
返回:
string
字符串
<名称="_f80c007993e22ac9e0130708a1b07927abcb980016b18ef2f7550d6b5c7c5824">
&Home@acoustic-content-sdk/tooling > canHaveLayout
canHaveLayout() function
Signature:
export declare function canHaveLayout(aType: AuthoringType): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
aType | AuthoringType |
Returns:
boolean
主页 > @acoustic-content-sdk/tooling > canonicalizeAssets
canonicalizeAssets() function
签名:
export declare function canonicalizeAssets(options: Schema): (aReadDir: ReadDirectory, logSvc?: LoggerService) => Observable<FileDescriptor<BaseAuthoringItem>>;
Parameters
Parameter | Type | Description |
---|---|---|
options | Schema |
返回:
(aReadDir: ReadDirectory, logSvc?: LoggerService) => Observable
Home > @acoustic-content-sdk/tooling > canonicalizeJson
canonicalizeJson() function
执行 JSON 对象的就地规范化
签名:
export declare function canonicalizeJson(aData: any): any;
Parameters
Parameter | Type | Description |
---|---|---|
aData | any |
the JSON object |
返回:
任何
规范化对象
> @acoustic-content-sdk/tooling > createFileDescriptor
createFileDescriptor() function
Signature:
export declare function createFileDescriptor<T>(aName: string, aValue: T): FileDescriptor<T>;
Parameters
Parameter | Type | Description |
---|---|---|
aName | string |
|
aValue | T |
Returns:
FileDescriptor
主页 > @acoustic-content-sdk/tooling > createGuid
createGuid() function
从 ID
签名:
export declare function createGuid(aId: BinaryLike, aSecret?: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
aId | BinaryLike |
the original ID |
aSecret | string |
some optional secret |
返回:
string
the guid
Home > @acoustic-content-sdk/tooling > createGuidFromBuffer
createGuidFromBuffer() function
从 ID
签名:
export declare function createGuidFromBuffer(aBuffer: Buffer): string;
Parameters
Parameter | Type | Description |
---|---|---|
aBuffer | Buffer |
返回:
string
the guid
Home > @acoustic-content-sdk/tooling > createReadDirectory
createReadDirectory() function
Signature:
export declare function createReadDirectory(aRoot: string): ReadDirectory;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
Returns:
ReadDirectory
主页 > @acoustic-content-sdk/tooling > createRevision
createRevision() function
Signature:
export declare function createRevision(aObj: any, aSecret?: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
aObj | any |
|
aSecret | string |
Returns:
string
主页 > @acoustic-content-sdk/tooling > createTypePredicate
createTypePredicate() function
Signature:
export declare function createTypePredicate(aOptions: {
include?: string[];
exclude?: string[];
}): Predicate<AuthoringType>;
Parameters
Parameter | Type | Description |
---|---|---|
aOptions | { include?: string[]; exclude?: string[]; } |
Returns:
Predicate
主页 > @acoustic-content-sdk/tooling > ensureDirPath
ensureDirPath() function
Signature:
export declare function ensureDirPath(aDir: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
aDir | string |
Returns:
string
主页 > @acoustic-content-sdk/tooling > ensureLeadingSlash
ensureLeadingSlash() function
Signature:
export declare function ensureLeadingSlash(aUrl: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
aUrl | string |
Returns:
string
主页 > @acoustic-content-sdk/tooling > ensureTrailingSlash
ensureTrailingSlash() function
Signature:
export declare function ensureTrailingSlash(aUrl: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
aUrl | string |
Returns:
string
主页 > @acoustic-content-sdk/tooling > findSdkVersion
findSdkVersion() function
定位SDK版本
签名:
export declare function findSdkVersion(aReadFile: ReadTextFile): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aReadFile | ReadTextFile |
read callback |
返回:
Observable
SDK版本
首页 @acoustic-content-sdk/tooling > findSdkVersionFromPkg
findSdkVersionFromPkg() function
定位SDK版本
签名:
export declare function findSdkVersionFromPkg(aPackage: any): string;
Parameters
Parameter | Type | Description |
---|---|---|
aPackage | any |
the package JSON |
返回:
string
SDK版本或异常if the SDK versions in the package are inconsistent
Home > @acoustic-content-sdk/tooling > generateDataOverlay
generateDataOverlay() function
为指定模块引用的所有 wchtools 数据文件夹生成文件流。
签名:
export declare function generateDataOverlay(aOptions: DataOverlaySchema): (aReadText: ReadTextFile, aReadDir: ReadDirectory, aLogSvc?: LoggerService) => Observable<FileDescriptor<Buffer>>;
Parameters
Parameter | Type | Description |
---|---|---|
aOptions | DataOverlaySchema |
options |
返回:
(aReadText: ReadTextFile, aReadDir: ReadDirectory, aLogSvc?: LoggerService) => Observable
一个生成覆盖
Remarks
的函数文件名是相对于引用的数据目录的,因此它们可以很容易地聚合
主页 > @acoustic-content-sdk/tooling > 生成密钥
generateKeys() function
签名:
export declare function generateKeys(options: Schema): (aReadDir: ReadDirectory, aLogSvc?: LoggerService) => import("rxjs").Observable<import("../../public_api").FileDescriptor<AuthoringContentItem>>;
Parameters
Parameter | Type | Description |
---|---|---|
options | Schema |
返回:
<代码>(aReadDir:ReadDirectory,aLogSvc?:LoggerService)=> import("rxjs").Observable
主页 > @acoustic-content-sdk/tooling > generateLayout
generateLayout() function
签名:
export declare function generateLayout(options: Schema): (aReadDir: ReadDirectory, logSvc?: LoggerService) => import("rxjs").Observable<import("../../public_api").FileDescriptor<string | Buffer | import("@acoustic-content-sdk/api").AuthoringLayoutMapping | import("@acoustic-content-sdk/api").AuthoringLayoutItem>>;
Parameters
Parameter | Type | Description |
---|---|---|
options | Schema |
返回:
(aReadDir: ReadDirectory, logSvc?: LoggerService) => import("rxjs").Observable
Home > @acoustic-content-sdk/tooling > generateLayouts
generateLayouts() function
签名:
export declare function generateLayouts(options: Schema): (aReadDir: ReadDirectory, logSvc?: LoggerService) => import("rxjs").Observable<import("../../public_api").FileDescriptor<string | Buffer | import("@acoustic-content-sdk/api").AuthoringLayoutMapping | import("@acoustic-content-sdk/api").AuthoringLayoutItem>>;
Parameters
Parameter | Type | Description |
---|---|---|
options | Schema |
返回:
(aReadDir: ReadDirectory, logSvc?: LoggerService) => import("rxjs").Observable
Home > @acoustic-content-sdk/tooling > getOrganization
getOrganization() function
从包名中提取组织
签名:
export declare function getOrganization(aPackageName: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
aPackageName | string |
the package name |
返回:
string
组织
<一个名字="_9f258a084f871e3140a2b496afddf24db8f676729f76bfb3c61747f6c6570aac">
7b9 @acoustic-content-sdk/tooling > hasTrailingSlash
hasTrailingSlash() function
Signature:
export declare function hasTrailingSlash(aUrl: string): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
aUrl | string |
Returns:
boolean
主页 > @acoustic-content-sdk/tooling > isFileDescriptor
isFileDescriptor() function
测试项目是否为文件描述符
签名:
export declare function isFileDescriptor<T>(aValue: any): aValue is FileDescriptor<T>;
Parameters
Parameter | Type | Description |
---|---|---|
aValue | any |
the value to test |
返回:
aValue is FileDescriptor
true if it is a descriptor
Home > @acoustic-content-sdk/tooling > logFileDescriptor
logFileDescriptor() function
签名:
export declare function logFileDescriptor<T>(): MonoTypeOperatorFunction<FileDescriptor<T>>;
返回:
MonoTypeOperatorFunction
首页 @acoustic-content-sdk/tooling > relativePath
relativePath() function
Signature:
export declare function relativePath(aSrc: string, aDst: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
aSrc | string |
|
aDst | string |
Returns:
string
主页 > @acoustic-content-sdk/tooling > rxFindAuthoringAssets
rxFindAuthoringAssets() function
从目录中读取创作资产
签名:
export declare function rxFindAuthoringAssets(aRoot: string, aTree: ReadDirectory): Observable<JsonEntry<AuthoringAsset>>;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
root directory |
aTree | ReadDirectory |
the tree |
返回:
&Observable
the result
Home > @acoustic-content-sdk/tooling > rxFindAuthoringContent
rxFindAuthoringContent() function
从目录中读取创作类型
签名:
export declare function rxFindAuthoringContent(aRoot: string, aTree: ReadDirectory): Observable<JsonEntry<AuthoringContentItem>>;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
root directory |
aTree | ReadDirectory |
the tree |
返回:
>
结果
@acoustic-content-sdk/tooling > rxFindAuthoringLayoutMappings
rxFindAuthoringLayoutMappings() function
从目录中读取创作布局
签名:
export declare function rxFindAuthoringLayoutMappings(aRoot: string, aTree: ReadDirectory): Observable<JsonEntry<AuthoringLayoutMapping>>;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
root directory |
aTree | ReadDirectory |
the tree |
返回:
Observable
the result
Home > @acoustic-content-sdk/tooling > rxFindAuthoringLayouts
rxFindAuthoringLayouts() function
从目录中读取创作布局
签名:
export declare function rxFindAuthoringLayouts(aRoot: string, aTree: ReadDirectory): Observable<JsonEntry<AuthoringLayoutItem>>;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
root directory |
aTree | ReadDirectory |
the tree |
返回:
Observable<tem;AuthoringEntry<tem;It
the result
Home > @acoustic-content-sdk/tooling > rxFindAuthoringTypes
rxFindAuthoringTypes() function
从目录中读取创作类型
签名:
export declare function rxFindAuthoringTypes(aRoot: string, aTree: ReadDirectory): Observable<JsonEntry<AuthoringType>>;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
root directory |
aTree | ReadDirectory |
the tree |
返回:
Observable
结果
@acoustic-content-sdk/tooling > rxFindDataDir
rxFindDataDir() function
Signature:
export declare function rxFindDataDir(host: ReadTextFile, options?: {
data?: string;
}): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
host | ReadTextFile |
|
options | { data?: string; } |
Returns:
Observable
主页 > @acoustic-content-sdk/tooling > rxFindPackageJson
rxFindPackageJson() function
加载相对于目录的包 JSON 文件
签名:
export declare function rxFindPackageJson(aDir: string, aReadFile: ReadTextFile): Observable<any>;
Parameters
Parameter | Type | Description |
---|---|---|
aDir | string |
the directory to start on |
aReadFile | ReadTextFile |
the read file callback |
返回:
Observable
an observable with the file
Home > @acoustic-content-sdk/tooling > rxFindProject
rxFindProject() function
从配置的项目名称中定位工作区项目,否则回退到默认项目
签名:
export declare function rxFindProject<TProjectType extends ProjectType = ProjectType.Application>(workspaceOrHost: WorkspaceSchema | ReadTextFile, options: {
project?: string;
}): Observable<WorkspaceProject<TProjectType>>;
Parameters
Parameter | Type | Description |
---|---|---|
workspaceOrHost | WorkspaceSchema | ReadTextFile |
the workspace root |
options | { project?: string; } |
the options |
返回:
Observable
the project
Home > @acoustic-content-sdk/tooling > rxFindProjectName
rxFindProjectName() function
从配置的项目名称中找到工作区项目,否则回退到默认项目
签名:
export declare function rxFindProjectName(workspaceOrHost: WorkspaceSchema | ReadTextFile, options: {
project?: string;
}): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
workspaceOrHost | WorkspaceSchema | ReadTextFile |
the workspace root |
options | { project?: string; } |
the options |
返回:
Observable
the project
Home > @acoustic-content-sdk/tooling > rxFindWchToolsOptions
rxFindWchToolsOptions() function
Signature:
export declare function rxFindWchToolsOptions(host: ReadTextFile, options?: {
data?: string;
}): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
host | ReadTextFile |
|
options | { data?: string; } |
Returns:
Observable
主页 > @acoustic-content-sdk/tooling > rxGetDependencies
rxGetDependencies() function
列出模块的所有节点依赖
Signature:
export declare function rxGetDependencies(aReadText: ReadTextFile, aRoot?: string): Observable<FileDescriptor<any>>;
Parameters
Parameter | Type | Description |
---|---|---|
aReadText | ReadTextFile |
the read text callback |
aRoot | string |
the root folder |
Returns:
Observable
依赖项列表。 返回的 FileDescriptor 的路径包含包的目录,而不是 package.json
文件的名称。 该值是 package.json
对象。
@acoustic-content-sdk/tooling > rxGetWorkspace
rxGetWorkspace() function
Signature:
export declare function rxGetWorkspace(aReadText: ReadTextFile): Observable<WorkspaceSchema>;
Parameters
Parameter | Type | Description |
---|---|---|
aReadText | ReadTextFile |
Returns:
Observable
主页 > @acoustic-content-sdk/tooling > rxGetWorkspacePath
rxGetWorkspacePath() function
Signature:
export declare function rxGetWorkspacePath(aReadText: ReadTextFile): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aReadText | ReadTextFile |
Returns:
Observable
主页 > @acoustic-content-sdk/tooling > rxLocateRootDir
rxLocateRootDir() function
根据工作目录定位应用根目录
签名:
export declare function rxLocateRootDir(aBaseDir?: string): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aBaseDir | string |
optionally the base directory, defaults to the current working dir |
返回:
Observable
the application root
Home > @acoustic-content-sdk/tooling > rxReadAuthoringContent
rxReadAuthoringContent() function
从目录中读取创作内容
签名:
export declare function rxReadAuthoringContent(aRoot: string, aTree: ReadDirectory): Observable<JsonEntryMap<AuthoringContentItem>>;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
root directory |
aTree | ReadDirectory |
the tree |
返回:
Observable<tent;AuthoringMap
the result
Home > @acoustic-content-sdk/tooling > rxReadAuthoringLayoutMappings
rxReadAuthoringLayoutMappings() function
从目录
签名:
export declare function rxReadAuthoringLayoutMappings(aRoot: string, aTree: ReadDirectory): Observable<JsonEntryMap<AuthoringLayoutMapping>>;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
root directory |
aTree | ReadDirectory |
the tree |
返回:
Layout
the result
Home > @acoustic-content-sdk/tooling > rxReadAuthoringLayouts
rxReadAuthoringLayouts() function
从目录中读取创作布局
签名:
export declare function rxReadAuthoringLayouts(aRoot: string, aTree: ReadDirectory): Observable<JsonEntryMap<AuthoringLayoutItem>>;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
root directory |
aTree | ReadDirectory |
the tree |
返回:
Observable
the result
Home > @acoustic-content-sdk/tooling > rxReadAuthoringTypes
rxReadAuthoringTypes() function
从目录中读取创作类型
签名:
export declare function rxReadAuthoringTypes(aRoot: string, aTree: ReadDirectory): Observable<JsonEntryMap<AuthoringType>>;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
root directory |
aTree | ReadDirectory |
the tree |
返回:
Observable
the result
Home > @acoustic-content-sdk/tooling > rxReadBuffer
rxReadBuffer() function
在文本回调之上读取 JSON 文件
签名:
export declare function rxReadBuffer<T>(aFile: string, aHost: ReadTextFile): Observable<T>;
Parameters
Parameter | Type | Description |
---|---|---|
aFile | string |
filename |
aHost | ReadTextFile |
callback host |
返回:
Observable
the JSON file
Home > @acoustic-content-sdk/tooling > rxReadDir
rxReadDir() function
读取目录及其所有(接受的)子目录中的所有文件
签名:
export declare function rxReadDir(aBaseDir: string, aAccept?: Predicate<ReadDirectoryEntry>): Observable<FileDescriptor<Buffer>>;
Parameters
Parameter | Type | Description |
---|---|---|
aBaseDir | string |
root directory |
aAccept | Predicate<ReadDirectoryEntry> |
function to test if the file is accepted |
返回:
Observable< ;FileDescriptor
a sequence of files in no particular order
Home > @acoustic-content-sdk/tooling > rxReadJsonFile
rxReadJsonFile() function
在文本回调之上读取 JSON 文件
签名:
export declare function rxReadJsonFile<T>(aFile: string, aHost: ReadTextFile): Observable<T>;
Parameters
Parameter | Type | Description |
---|---|---|
aFile | string |
filename |
aHost | ReadTextFile |
callback host |
返回:
Observable
the JSON file
Home > @acoustic-content-sdk/tooling > rxWchToolsManifest
rxWchToolsManifest() function
创建一个将文件序列转换为清单的操作符
签名:
export declare function rxWchToolsManifest(aName: string): OperatorFunction<FileDescriptor<any>, FileDescriptor<any>>;
Parameters
Parameter | Type | Description |
---|---|---|
aName | string |
the name of the manifest |
返回:
OperatorFunction
the operator
Home > @acoustic-content-sdk/tooling > rxWriteJsonFile 保存
rxWriteJsonFile() function
一个 JSON 文件
签名:
export declare function rxWriteJsonFile(aName: string, aValue: any, aHost: WriteTextFile): Observable<string>;
Parameters
Parameter | Type | Description |
---|---|---|
aName | string |
name of the file |
aValue | any |
value of the file |
aHost | WriteTextFile |
host that can write text files |
返回:
Observable
的名称the file
Home > @acoustic-content-sdk/tooling > selectOptionsForTarget
selectOptionsForTarget() function
返回选择器函数,该函数为目标选择配置选项
签名:
export declare function selectOptionsForTarget(aTarget?: string, aConfiguration?: string): UnaryFunction<WorkspaceProject, JSONObject>;
Parameters
Parameter | Type | Description |
---|---|---|
aTarget | string |
the project target, e.g. 'build' |
aConfiguration | string |
the configuration name, probably more than one configurations |
返回:
UnaryProject
the options
Home > @acoustic-content-sdk/tooling > serializeJson
serializeJson() function
签名:
export declare function serializeJson(aData: any): string | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
aData | any |
返回:
string | 未定义
Home @acoustic-content-sdk/tooling > wchToolsCleanup
wchToolsCleanup() function
Signature:
export declare function wchToolsCleanup<T>(aItem: FileDescriptor<T>): FileDescriptor<T>;
Parameters
Parameter | Type | Description |
---|---|---|
aItem | FileDescriptor<T> |
Returns:
FileDescriptor
主页 > @acoustic-content-sdk/tooling > wchToolsFileDescriptor
wchToolsFileDescriptor() function
从项目
Signature:
export declare function wchToolsFileDescriptor<T extends AuthoringItem>(aItem: T | FileDescriptor<T>): FileDescriptor<T>;
Parameters
Parameter | Type | Description |
---|---|---|
aItem | T | FileDescriptor<T> |
the authoring item |
返回:
FileDescriptor
描述符
b191b7c716ce8" @acoustic-content-sdk/tooling > writeFiles
writeFiles() function
返回一个将所有文件描述符写入磁盘的操作符
签名:
export declare function writeFiles<T>(aRoot: string, aOverride?: boolean): MonoTypeOperatorFunction<FileDescriptor<T>>;
Parameters
Parameter | Type | Description |
---|---|---|
aRoot | string |
the base of the target file system |
aOverride | boolean |
override flag |
返回:
MonoTypeOperatorFunction
the operator
Home > @acoustic-content-sdk/tooling > DataOverlaySchema
DataOverlaySchema interface
Signature:
export interface DataOverlaySchema
Properties
Property | Type | Description |
---|---|---|
src | string |
Source folder, uses the root folder if empty |
Home > ; @acoustic-content-sdk/tooling > JsonEntry
JsonEntry interface
Signature:
export interface JsonEntry<T>
Properties
Property | Type | Description |
---|---|---|
entry | T |
|
id | string |
|
path | string |
Home > @acoustic-content-sdk/tooling > ReadDirectoryEntry
ReadDirectoryEntry interface
File descriptor
Signature:
export interface ReadDirectoryEntry
Properties
Property | Type | Description |
---|---|---|
isDirectory | boolean |
|
path | string |
Home > @acoustic-content-sdk/tooling > [WorkspaceProject](#_0293a864b1d10062de04112b8d5ec80a2d89f6d70f50635c