3.0.4 • Published 6 months ago
@types/lerna-alias v3.0.4
Installation
npm install --save @types/lerna-alias
Summary
This package contains type definitions for lerna-alias (https://github.com/Andarist/lerna-alias#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lerna-alias.
index.d.ts
// Type definitions for lerna-alias 3.0
// Project: https://github.com/Andarist/lerna-alias#readme
// Definitions by: Elizabeth Craig <https://github.com/ecraig12345>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface Aliases {
/**
* Key is the package name or an appropriate mapping for the tool.
* Value is a local directory path to the package resolved using
* `sourceDirectory` and `mainFields` options.
*/
[packageName: string]: string;
}
export interface Options {
/**
* From which directory the lerna monorepo should be searched for
* @default `process.cwd()`
*/
directory?: string | undefined;
/**
* Optional array of `mainFields` that should be used to resolve package's entry point,
* similar to https://webpack.js.org/configuration/resolve/#resolve-mainfields .
* Using this takes precedence over default `sourceDirectory` option.
*/
mainFields?: ReadonlyArray<string> | undefined;
/**
* Which directory should be considered as containing source files of a package.
* If specified as false it will use package's root.
* @default 'src'
*/
sourceDirectory?: string | false | undefined;
}
/**
* Returns Jest-style aliases to the source of a package: a map from `'^package-name$'`
* to package source root, for example `'/path/to/package-name/src/index'`
* (the exact form of the path may vary depending on options).
*/
export function jest(options?: Options): Aliases;
/**
* Returns Rollup-style aliases to the source of a package: a map from `'package-name'`
* to package source root, for example `'/path/to/package-name/src/index'`
* (the exact form of the path may vary depending on options).
*/
export function rollup(options?: Options): Aliases;
/**
* Returns Webpack-style aliases to the source of a package: a map from `'package-name$'`
* to package source root, for example `'/path/to/package-name/src/index'`
* (the exact form of the path may vary depending on options).
*/
export function webpack(options?: Options): Aliases;
Additional Details
- Last updated: Thu, 08 Jul 2021 16:23:40 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Elizabeth Craig.