How to use the generator-jhipster/cli/utils.logger.error function in generator-jhipster

To help you get started, we’ve selected a few generator-jhipster 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 jhipster / generator-jhipster-micronaut / cli / mhipster.js View on Github external
* distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const semver = require('semver');
const path = require('path');
const { logger } = require('generator-jhipster/cli/utils');
const packageJson = require('../package.json');

const currentNodeVersion = process.versions.node;
const minimumNodeVersion = packageJson.engines.node;

if (!semver.satisfies(currentNodeVersion, minimumNodeVersion)) {
    /* eslint-disable no-console */
    logger.error(
        `You are running Node version ${currentNodeVersion}\nMHipster requires Node version ${minimumNodeVersion}\nPlease update your version of Node.`
    );
    /* eslint-enable  */
}

let preferLocal = true;

// Don't use commander for parsing command line to avoid polluting it in cli.js
// --prefer-local: Always resolve node modules locally (useful when using linked module)
if (process.argv.includes('upgrade') && !process.argv.includes('--prefer-local')) {
    // Prefer global version for `jhipster upgrade` to get most recent code
    preferLocal = false;
}

// Pass in micronaut as a blueprint module.
// User passes in blueprints flag but without micronaut :> append micronaut

generator-jhipster

Spring Boot + Angular/React/Vue in one handy generator

Apache-2.0
Latest version published 23 days ago

Package Health Score

89 / 100
Full package analysis