SkinsManifest - DauntlessStudio/Bedrock-Developments GitHub Wiki

Class: SkinsManifest

Remarks

A class for working with manifest files.

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new SkinsManifest(filepath, template): SkinsManifest

Parameters

Name Type
filepath string
template IManifest

Returns

SkinsManifest

Inherited from

Manifest.constructor

Defined in

ts/app/types/manifest.ts:61

Properties

dependencies

Optional dependencies: (IManifestDependencyPack | IManifestDependencyScript)[]

Inherited from

Manifest.dependencies

Defined in

ts/app/types/manifest.ts:56


filePath

filePath: string

Inherited from

Manifest.filePath

Defined in

ts/app/types/minecraft.ts:23


format_version

format_version: number

Inherited from

Manifest.format_version

Defined in

ts/app/types/manifest.ts:53


header

header: IManifestHeader

Inherited from

Manifest.header

Defined in

ts/app/types/manifest.ts:54


metadata

Optional metadata: Object

Type declaration

Name Type
authors string[]

Inherited from

Manifest.metadata

Defined in

ts/app/types/manifest.ts:57


modules

modules: IManifestModule[]

Inherited from

Manifest.modules

Defined in

ts/app/types/manifest.ts:55

Accessors

DirectoryPath

get DirectoryPath(): string

Returns

string

Remarks

The directory where this type of file is kept.

Overrides

Manifest.DirectoryPath

Defined in

ts/app/types/manifest.ts:107

Methods

replacer

replacer(key, value): any

Parameters

Name Type
key string
value any

Returns

any

Inherited from

Manifest.replacer

Defined in

ts/app/types/minecraft.ts:72


serialize

serialize(): string

Returns

string

A string representation of this object.

Remarks

Serializes this object to a string.

Inherited from

Manifest.serialize

Defined in

ts/app/types/minecraft.ts:63


toFile

toFile(handleExisting?): File

Parameters

Name Type Description
handleExisting? "overwrite" | "overwrite_silent" How to handle existing files. Undefined will not overwrite, 'overwite' replaces the file with this object, 'overwrite_silent' does the same with no terminal log.

Returns

File

A File object with this MinecraftDataType's filepath, and this object serialized as the file contents.

Remarks

Creates a File object from this MinecraftDataType.

Inherited from

Manifest.toFile

Defined in

ts/app/types/minecraft.ts:98


createFilePath

createFilePath(nameData): string

Parameters

Name Type Description
nameData NameData The namedata to use when creating the filepath.

Returns

string

The filepath as a string.

Remarks

Creates a filepath for this object type from a NameData.

Inherited from

Manifest.createFilePath

Defined in

ts/app/types/minecraft.ts:46


createFromTemplate

createFromTemplate(): WorldManifest

Returns

WorldManifest

An instance of this data type.

Remarks

Creates a new instance of the data type using reasonable defaults from a NameData.

Overrides

Manifest.createFromTemplate

Defined in

ts/app/types/manifest.ts:111


deserialize

deserialize<T>(create, filepath, json): T

Type parameters

Name
T

Parameters

Name Type Description
create (filePath: string, template: any) => T The child of MinecraftDataType to create.
filepath string The filepath the MinecraftDataType can be written to with toFile.
json string The source string this should be deserialized from.

Returns

T

An instance of the MinecraftDataType child provided.

Remarks

Creates an instace of a MinecraftDataType child from a source string, used in fromFile.

Inherited from

Manifest.deserialize

Defined in

ts/app/types/minecraft.ts:83


fromFile

fromFile<T>(create, file): T

Type parameters

Name
T

Parameters

Name Type Description
create (filePath: string, template: any) => T The child of MinecraftDataType to create.
file File The File object used to deserialize into this object.

Returns

T

An instance of the MinecraftDataType child provided.

Remarks

Crates an instance of a MinecraftDataTypeChild from a File.

Inherited from

Manifest.fromFile

Defined in

ts/app/types/minecraft.ts:108


fromPathOrTemplate

fromPathOrTemplate<T>(create, path): T

Type parameters

Name
T

Parameters

Name Type Description
create (filePath: string, template: any) => T The child of MinecraftDataType to create.
path string The filepath to create the object from.

Returns

T

The deserialized file as a child of MinecraftDataType, or this object's createFromTemplate default if the file doesn't exist.

Remarks

Creates a MinecraftDataType object from a filepath, or a template if that filepath doesn't exist.

Inherited from

Manifest.fromPathOrTemplate

Defined in

ts/app/types/minecraft.ts:118

⚠️ **GitHub.com Fallback** ⚠️