1.2.3 • Published 5 years ago

get-roots v1.2.3

Weekly downloads
59
License
ISC
Repository
github
Last release
5 years ago

Get-roots

simple package for getting package roots in sync manner. provides pre-defined queries for git root, monorepo root and package root.

API

module "get-roots" {
    // generic function for search of any root.
    export declare function getRootByFilename(location: string, filenames: string[]): string;
    export declare const getPackageRoot: (location: string) => string;
    export declare const getGitRoot: (location: string) => string;
    export declare const getMonorepoRoot: (location: string) => string;
}

Usage

const {getPackageRoot, getGitRoot, getMonorepoRoot} = require("get-roots");
console.log({
    packageRoot: getPackageRoot(__dirname),
    gitRoot: getGitRoot(__dirname),
    monorepoRoot: getMonorepoRoot(__dirname)
})
1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago