Skip to content

Commit

Permalink
feat(generator-liferay-js): remove @liferay/cli spam
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
izaera committed Dec 22, 2021
1 parent 98aef03 commit 0662139
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -125,8 +124,6 @@ export default class extends Generator {
initializing() {
this.sourceRoot(path.join(__dirname, 'templates'));

warnAboutLiferayCli();

print(msg.welcome);

switch (project.probe.type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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', [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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
`
);
}

0 comments on commit 0662139

Please sign in to comment.