npm.io
1.0.5 • Published 6 years ago

@xmcl/version

Licence
MIT
Version
1.0.5
Deps
1
Size
79 kB
Vulns
0
Weekly
0
Stars
220
DeprecatedThis package is deprecated

Version Module

npm version npm Build Status

This is a sub-module belong to minecraft-launcher-core module. You can still use this individually.

Usage

Minecraft Version Parsing

Parse minecraft version as a resolved version, which is used for launching process. You can also read version info from it if you want.

    import { Versoin } from "@xmcl/version";
    const minecraftLocation: string;
    const minecraftVersionId: string;

    const resolvedVersion: ResolvedVersion = await Version.parse(minecraftLocation, minecraftVersionId);

Get the report of the version. It can also check if the version is missing assets/libraries.

    import { Versoin, VersionDiagnosis } from "@xmcl/version";
    const minecraftLocation: string;
    const minecraftVersionId: string;

    const report: VersionDiagnosis = await Version.diagnose(minecraftLocation, minecraftVersionId);

Keywords