@liferay/generator-js
Version:
Yeoman generators for Liferay DXP and Portal CE JavaScript projects.
48 lines (47 loc) • 1.53 kB
TypeScript
/**
* SPDX-FileCopyrightText: © 2017 Liferay, Inc. <https://liferay.com>
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
import JsonModifier from '../JsonModifier';
/**
* A class to help modifying the .npmbuildrc file.
*/
export default class extends JsonModifier {
/**
* @param {Generator} generator a Yeoman generator
*/
constructor(generator: any);
/**
* Set local Liferay installation directory
* @param {string} liferayDir
*/
setLiferayDir(liferayDir: any): void;
/**
* Set supported locales array
* @param {Array<string>} supportedLocales
*/
setSupportedLocales(supportedLocales: any): void;
/**
* Set Microsoft Translator credentials
* @param {string} key
*/
setTranslatorTextKey(translatorTextKey: any): void;
/**
* Set webpack's main module.
* @param {string} mainModule
*/
setWebpackMainModule(mainModule: any): void;
/**
* Add a webpack rule to the .npmbuildrc file.
* @param {RegExp} regex a regex expression to match files
* @param {string} loader the name of a webpack loader
* @param {boolean} fixPathSepsInWindows wether to replace / path separators
* by \ when running on Windows
*/
addWebpackRule(regex: any, loader: any, fixPathSepsInWindows?: boolean): void;
/**
* Add webpack extensions to the .npmbuildrc file.
* @param {Array<string>} extensions the file extensions to add
*/
addWebpackExtensions(...extensions: any[]): void;
}