@acoustic-content-sdk/tooling-pkg-mgr

Tooling functions to implement support for feature modules.

Usage no npm install needed!

<script type="module">
  import acousticContentSdkToolingPkgMgr from 'https://cdn.skypack.dev/@acoustic-content-sdk/tooling-pkg-mgr';
</script>

README

npm

Tooling functions to implement support for feature modules.

API Documentation

Home > @acoustic-content-sdk/tooling-pkg-mgr

tooling-pkg-mgr package

Tooling functions to implement support for feature modules.

Enumerations

Enumeration Description
PackageManager Enumeration of the supported package managers

Functions

Function Description
getPackageManager(aRoot) Decodes the supported workspace from the host
rxSupportsNpm() Tests if we have an npm installation
rxSupportsYarn() Tests if we have a yarn installation
rxYarnHasPackage(aName, aRange) Tests if we have a matching package installation

Variables

Variable Description
VERSION Version and build number of the package

Home > @acoustic-content-sdk/tooling-pkg-mgr > PackageManager

PackageManager enum

Enumeration of the supported package managers

Signature:

export declare enum PackageManager 

Enumeration Members

Member Value Description
NPM "npm"
YARN "yarn"

Home > @acoustic-content-sdk/tooling-pkg-mgr > getPackageManager

getPackageManager() function

Decodes the supported workspace from the host

Signature:

export declare function getPackageManager(aRoot: string): Observable<PackageManager>;

Parameters

Parameter Type Description
aRoot string the root dir to test

Returns:

Observable<PackageManager>

the supported package manager

Home > @acoustic-content-sdk/tooling-pkg-mgr > rxSupportsNpm

rxSupportsNpm() function

Tests if we have an npm installation

Signature:

export declare function rxSupportsNpm(): Observable<boolean>;

Returns:

Observable<boolean>

true if we have an installation, else false

Home > @acoustic-content-sdk/tooling-pkg-mgr > rxSupportsYarn

rxSupportsYarn() function

Tests if we have a yarn installation

Signature:

export declare function rxSupportsYarn(): Observable<boolean>;

Returns:

Observable<boolean>

true if we have an installation, else false

Home > @acoustic-content-sdk/tooling-pkg-mgr > rxYarnHasPackage

rxYarnHasPackage() function

Tests if we have a matching package installation

Signature:

export declare function rxYarnHasPackage(aName: string, aRange: string): Observable<boolean>;

Parameters

Parameter Type Description
aName string package name
aRange string

Returns:

Observable<boolean>

true if we have such a package

Home > @acoustic-content-sdk/tooling-pkg-mgr > VERSION

VERSION variable

Version and build number of the package

Signature:

VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}