From 066213973b23e5d532ac559e6c55f5e056beab80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Zaera=20Avell=C3=B3n?= Date: Wed, 22 Dec 2021 09:39:13 +0100 Subject: [PATCH] feat(generator-liferay-js): remove @liferay/cli spam I'm reverting this commit since generator-liferay-js is used from blade and showing this message to those users can be misleading. In the future we should aim at showing this message only to pure JS users but, until we decide how to do it, I'm reverting this to avoid confusion. --- .../generator-liferay-js/src/adapt/index.js | 3 -- .../generator-liferay-js/src/app/index.js | 4 +- .../generator-liferay-js/src/utils/index.js | 37 ------------------- 3 files changed, 1 insertion(+), 43 deletions(-) diff --git a/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/adapt/index.js b/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/adapt/index.js index 067f6de9d4..0b922ce2a2 100644 --- a/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/adapt/index.js +++ b/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/adapt/index.js @@ -23,7 +23,6 @@ import { getSDKVersion, promptWithConfig, validateLiferayDir, - warnAboutLiferayCli, } from '../utils'; import ProjectAnalyzer from '../utils/ProjectAnalyzer'; import LanguagePropertiesModifier from '../utils/modifier/features/localization/Language.properties'; @@ -125,8 +124,6 @@ export default class extends Generator { initializing() { this.sourceRoot(path.join(__dirname, 'templates')); - warnAboutLiferayCli(); - print(msg.welcome); switch (project.probe.type) { diff --git a/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/app/index.js b/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/app/index.js index b90ad60a2b..b2bb269867 100644 --- a/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/app/index.js +++ b/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/app/index.js @@ -8,7 +8,7 @@ import path from 'path'; import {argv} from 'yargs'; import Generator from 'yeoman-generator'; -import {promptWithConfig, warnAboutLiferayCli} from '../utils'; +import {promptWithConfig} from '../utils'; // If --which parameter is given show path to generator and exit @@ -26,8 +26,6 @@ export default class extends Generator { * Standard Yeoman initialization function */ async initializing() { - warnAboutLiferayCli(); - const targets = this._findTargets(); const answers = await promptWithConfig(this, 'app', [ diff --git a/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/utils/index.js b/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/utils/index.js index c65be44ef1..4f084883dd 100644 --- a/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/utils/index.js +++ b/maintenance/projects/js-toolkit/packages/generator-liferay-js/src/utils/index.js @@ -4,7 +4,6 @@ */ import fs from 'fs'; -import {print, warn} from 'liferay-npm-build-tools-common/lib/format'; import path from 'path'; import pkgJson from '../../package.json'; @@ -257,39 +256,3 @@ export function validateLiferayDir(input) { return true; } - -/** - * Encourage users to switch to @liferay/cli - */ -export function warnAboutLiferayCli() { - print( - '', - warn` -WARNING !!!! - -The Liferay JavaScript Toolkit Yeoman generator has been discontinued -and replaced by {@liferay/cli}. - -You can still use this generator, but we encourage you to switch to -{@liferay/cli} as soon as possible so that you can continue using the -Liferay JavaScript Toolkit normally. - -Please check the documentation in the following URL for more information -on how to use {@liferay/cli}: - -· https://bit.ly/liferay-cli-manual - -If you have any project already generated with this Yeoman generator, -consider upgrading it to {@liferay/cli} as explained in the following -documentation: - -· https://bit.ly/liferay-cli-manual-upgrade - -Finally, if you have any problem with this, don't hesitate to file an -issue in our GitHub repository: - -· https://github.com/liferay/liferay-frontend-projects/issues - - ` - ); -}