@liferay/generator-js
Version:
Yeoman generators for Liferay DXP and Portal CE JavaScript projects.
38 lines (37 loc) • 1.17 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 configuration.json file.
*/
export default class ConfigurationJsonModifier extends JsonModifier {
static readonly Section: {
PORTLET_INSTANCE: string;
SYSTEM: string;
};
/**
* @param {Generator} generator a Yeoman generator
*/
constructor(generator: any);
/**
* Add a field to the file
* @param {string} section one of the values in `ConfigurationJsonModifier.Section`
* @param {string} id
* @param {string} type
* @param {string} name
* @param {string} description
* @param {boolean} required
* @param {any} defaultValue
* @param {object} options a hash of option ids as keys and objects with a
* name field as values
*/
addField(section: any, id: any, type: any, { defaultValue, description, name, options, required }: {
defaultValue: any;
description: any;
name: any;
options: any;
required: any;
}): void;
}