@types/lerna-alias
TypeScript icon, indicating that this package has built-in type declarations

3.0.4 • Public • Published

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

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?: readonly 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: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: none

Credits

These definitions were written by Elizabeth Craig.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/lerna-alias

Weekly Downloads

76

Version

3.0.4

License

MIT

Unpacked Size

6.3 kB

Total Files

5

Last publish

Collaborators

  • types