docs(nxdev): cleanup imports (#11563)

This commit is contained in:
Benjamin Cabanes 2022-08-12 10:24:36 -04:00 committed by GitHub
parent 8eb2304ecd
commit d13d5eb3b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 12 deletions

View File

@ -2,6 +2,9 @@ import * as chalk from 'chalk';
import { readFileSync } from 'fs'; import { readFileSync } from 'fs';
import { readJsonSync } from 'fs-extra'; import { readJsonSync } from 'fs-extra';
import { join } from 'path'; import { join } from 'path';
import { register as registerTsConfigPaths } from 'tsconfig-paths';
import { dedent } from 'tslint/lib/utils';
import { examples } from '../../packages/nx/src/command-line/examples';
import { import {
formatDeprecated, formatDeprecated,
generateMarkdownFile, generateMarkdownFile,
@ -10,9 +13,6 @@ import {
parseCommand, parseCommand,
ParsedCommand, ParsedCommand,
} from './utils'; } from './utils';
import { register as registerTsConfigPaths } from 'tsconfig-paths';
import { examples } from '../../packages/nx/src/command-line/examples';
import { dedent } from 'tslint/lib/utils';
const importFresh = require('import-fresh'); const importFresh = require('import-fresh');

View File

@ -2,13 +2,12 @@ import * as chalk from 'chalk';
import { dedent } from 'tslint/lib/utils'; import { dedent } from 'tslint/lib/utils';
import { import {
generateMarkdownFile, generateMarkdownFile,
generateOptionsMarkdown,
getCommands, getCommands,
parseCommand, parseCommand,
ParsedCommand, ParsedCommand,
sortAlphabeticallyFunction,
formatDeprecated,
generateOptionsMarkdown,
} from './utils'; } from './utils';
const importFresh = require('import-fresh'); const importFresh = require('import-fresh');
export async function generateCNWocumentation(commandsOutputDirectory: string) { export async function generateCNWocumentation(commandsOutputDirectory: string) {

View File

@ -1,6 +1,6 @@
import * as chalk from 'chalk';
import { execSync, ExecSyncOptions } from 'child_process'; import { execSync, ExecSyncOptions } from 'child_process';
import { join } from 'path'; import { join } from 'path';
import * as chalk from 'chalk';
export function generateDevkitDocumentation() { export function generateDevkitDocumentation() {
console.log(`\n${chalk.blue('i')} Generating Documentation for Devkit\n`); console.log(`\n${chalk.blue('i')} Generating Documentation for Devkit\n`);

View File

@ -3,9 +3,9 @@
* - Error if `map.json` reference a markdown file that does not exist * - Error if `map.json` reference a markdown file that does not exist
* - Error if a markdown file exists without reference in `map.json` * - Error if a markdown file exists without reference in `map.json`
*/ */
import * as chalk from 'chalk';
import { readJsonSync } from 'fs-extra'; import { readJsonSync } from 'fs-extra';
import * as glob from 'glob'; import * as glob from 'glob';
import * as chalk from 'chalk';
console.log(`${chalk.blue('i')} Documentation Map Check`); console.log(`${chalk.blue('i')} Documentation Map Check`);

View File

@ -1,9 +1,9 @@
import * as chalk from 'chalk'; import * as chalk from 'chalk';
import * as yargs from 'yargs'; import { execSync } from 'child_process';
import { watch } from 'chokidar'; import { watch } from 'chokidar';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
import { debounceTime, filter, switchMapTo, tap } from 'rxjs/operators'; import { debounceTime, filter, switchMapTo, tap } from 'rxjs/operators';
import { execSync } from 'child_process'; import * as yargs from 'yargs';
/** /**
* Available colours * Available colours

View File

@ -1,5 +1,5 @@
import { Canvas, Image, SKRSContext2D } from '@napi-rs/canvas'; import { Canvas, Image, SKRSContext2D } from '@napi-rs/canvas';
import { readJSONSync, ensureDir, readFile, writeFileSync } from 'fs-extra'; import { ensureDir, readFile, readJSONSync, writeFileSync } from 'fs-extra';
import { resolve } from 'path'; import { resolve } from 'path';
const mapJson = readJSONSync('./docs/map.json', 'utf8'); const mapJson = readJSONSync('./docs/map.json', 'utf8');

View File

@ -2,7 +2,6 @@
* Lookup for all the schema.json and add create a list with their path and related package information * Lookup for all the schema.json and add create a list with their path and related package information
* */ * */
import * as chalk from 'chalk'; import * as chalk from 'chalk';
import { readJsonSync, writeJSONSync } from 'fs-extra';
import { join, resolve } from 'path'; import { join, resolve } from 'path';
import { import {
getSchemaFromReference, getSchemaFromReference,

View File

@ -2,6 +2,7 @@ import { outputFileSync, readJsonSync } from 'fs-extra';
import { join } from 'path'; import { join } from 'path';
import { format, resolveConfig } from 'prettier'; import { format, resolveConfig } from 'prettier';
import { dedent } from 'tslint/lib/utils'; import { dedent } from 'tslint/lib/utils';
const stripAnsi = require('strip-ansi'); const stripAnsi = require('strip-ansi');
const importFresh = require('import-fresh'); const importFresh = require('import-fresh');