UNPKG

liferay-npm-bundler-preset-reactjs

Version:

liferay npm bundler preset react

45 lines (44 loc) 1.48 kB
/** * SPDX-FileCopyrightText: © 2020 Liferay, Inc. <https://liferay.com> * SPDX-License-Identifier: LGPL-3.0-or-later */ import FilePath from './file-path'; /** * A package descriptor class to identify directories containing packages. */ export default class PkgDesc { /** Well known id for the root package */ static readonly ROOT_ID = "/"; /** * @param name name of package * @param version version number * @param pkgPath directory where package lives (or null if it is the root * package) * @param forceRoot create a root package even if dir is not null */ constructor(name: string, version: string, pkgPath: string, forceRoot?: boolean); /** * Clone this object and optionally modify some of its fields. * @param dir override package directory path or FilePath * @return a clone of this (perhaps modified) package descriptor */ clone({ dir }?: { dir?: FilePath | string; }): PkgDesc; /** * Get directory where package lives referenced to `project.dir`. Note that * it always start with `./` so that it can be used in `path.join()` calls. */ get dir(): FilePath; get clean(): boolean; set clean(clean: boolean); get id(): string; get name(): string; get version(): string; get isRoot(): boolean; private _clean; private readonly _dir; private readonly _id; private readonly _name; private readonly _version; }