How to use the liferay-theme-tasks/lib/devDependencies.optional function in liferay-theme-tasks

To help you get started, we’ve selected a few liferay-theme-tasks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github liferay / liferay-js-themes-toolkit / packages / generator-liferay-theme / generators / app / index.js View on Github external
_promptCallback(props) {
		const liferayVersion = props.liferayVersion;

		this.appname = props.themeId;
		this.fontAwesome = props.fontAwesome;

		const devDependenciesToInsert = devDependencies.default;

		if (liferayVersion !== '*') {
			if (this.fontAwesome) {
				const fontAwesomeVersion =
					devDependencies.optional['liferay-font-awesome'];
				devDependenciesToInsert[
					'liferay-font-awesome'
				] = fontAwesomeVersion;
			}

			this.devDependencies = JSON.stringify(
				devDependenciesToInsert,
				null,
				2
			)
				.split(/\n\s*/)
				.join('\n\t\t')
				.replace('\t\t}', '\t}');
		}
		this.liferayVersion = liferayVersion;
		this.themeName = props.themeName;

liferay-theme-tasks

A set of tasks for building and deploying Liferay Portal themes.

MIT
Latest version published 8 months ago

Package Health Score

74 / 100
Full package analysis