mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-07 12:47:49 +00:00
fix: assert node version (#229)
* assert node version * chore: moved assert node fuction to separate file
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { basename, dirname, extname, join, resolve } from 'path';
|
||||
import { blue, gray, green, red, yellow } from 'colorette';
|
||||
import { performance } from "perf_hooks";
|
||||
import * as colors from 'colorette';
|
||||
import * as glob from 'glob-promise';
|
||||
import * as yaml from 'js-yaml';
|
||||
import * as fs from 'fs';
|
||||
@@ -79,7 +78,7 @@ export function getExecutionTime(startedAt: number) {
|
||||
|
||||
export function printExecutionTime(commandName: string, startedAt: number, entrypoint: string) {
|
||||
const elapsed = getExecutionTime(startedAt);
|
||||
process.stderr.write(colors.gray(`\n${entrypoint}: ${commandName} processed in ${elapsed}\n\n`));
|
||||
process.stderr.write(gray(`\n${entrypoint}: ${commandName} processed in ${elapsed}\n\n`));
|
||||
}
|
||||
|
||||
export function pathToFilename(path: string) {
|
||||
@@ -279,6 +278,6 @@ export function printUnusedWarnings(config: LintConfig) {
|
||||
}
|
||||
|
||||
export function exitWithError(message: string) {
|
||||
process.stderr.write(red(message));
|
||||
process.stderr.write(red(message)+ '\n\n');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user