UNPKG

liferay-npm-bundler-preset-reactjs

Version:

liferay npm bundler preset react

36 lines (35 loc) 1.44 kB
/** * SPDX-FileCopyrightText: © 2020 Liferay, Inc. <https://liferay.com> * SPDX-License-Identifier: LGPL-3.0-or-later */ import { Project } from '.'; import PkgDesc from '../pkg-desc'; import { BundlerPluginDescriptor } from './types'; /** * * @param project * @param featuresKey * @param defaultPrjRelPosixPath a posix path relative to project root * @return absolute path to features file */ export declare function getFeaturesFilePath(project: Project, featuresKeyPath: string, defaultPrjRelPosixPath: string): string | undefined; /** * Get a configuration for a specific package. This method looks in the packages * section, then at root in the precedence order: first package id, then package * name. * * @remarks * Returns different types depending on `section` * * @param project * @param pkg the package descriptor * @param section the section name (like 'plugins', '.babelrc', ...) * @param defaultValue default value if not configured */ export declare function getPackageConfig(project: Project, pkg: PkgDesc, section: 'copy-plugins' | 'plugins' | '.babelrc' | 'post-plugins', defaultValue?: object): object; /** * Instantiate bundler plugins described by their names. * @param project * @param pkgConfig plugins configuration as extracted from .npmbundlerrc */ export declare function createBundlerPluginDescriptors<T>(project: Project, pkgConfig: (object | string)[]): BundlerPluginDescriptor<T>[];