packages/cli: rename helpers to lib

This commit is contained in:
Patrik Oldsberg
2020-04-18 01:32:33 +02:00
parent 17c4a04818
commit 462f82e4e6
23 changed files with 27 additions and 27 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { run } from 'helpers/run';
import { run } from 'lib/run';
export default async () => {
const args = ['build'];
+1 -1
View File
@@ -15,7 +15,7 @@
*/
import { spawn } from 'child_process';
import { waitForExit } from 'helpers/run';
import { waitForExit } from 'lib/run';
import { watchDeps } from 'commands/watch-deps';
import { createLogger } from 'commands/watch-deps/logger';
@@ -16,11 +16,11 @@
import fs from 'fs-extra';
import { resolve as resolvePath, relative as relativePath } from 'path';
import { runPlain, runCheck } from 'helpers/run';
import { runPlain, runCheck } from 'lib/run';
import { Options } from './options';
import { extractArchive, createArchive } from './archive';
import { paths } from 'helpers/paths';
import { version, isDev } from 'helpers/version';
import { paths } from 'lib/paths';
import { version, isDev } from 'lib/version';
const INFO_FILE = '.backstage-build-cache';
@@ -16,7 +16,7 @@
import fs from 'fs-extra';
import { Command } from 'commander';
import { run } from 'helpers/run';
import { run } from 'lib/run';
import { Cache } from './cache';
import { parseOptions, Options } from './options';
@@ -16,7 +16,7 @@
import { resolve as resolvePath } from 'path';
import { Command } from 'commander';
import { paths } from 'helpers/paths';
import { paths } from 'lib/paths';
const DEFAULT_CACHE_DIR = '<repoRoot>/node_modules/.cache/backstage-builds';
const DEFAULT_MAX_ENTRIES = 10;
+1 -1
View File
@@ -17,7 +17,7 @@
import fs from 'fs-extra';
import { resolve as resolvePath, relative as relativePath } from 'path';
import { getDefaultCacheOptions } from 'commands/build-cache/options';
import { paths } from 'helpers/paths';
import { paths } from 'lib/paths';
export default async function clean() {
const cacheOptions = getDefaultCacheOptions();
@@ -21,9 +21,9 @@ import inquirer, { Answers, Question } from 'inquirer';
import { exec as execCb } from 'child_process';
import { resolve as resolvePath } from 'path';
import os from 'os';
import { Task, templatingTask } from 'helpers/tasks';
import { paths } from 'helpers/paths';
import { version } from 'helpers/version';
import { Task, templatingTask } from 'lib/tasks';
import { paths } from 'lib/paths';
import { version } from 'lib/version';
const exec = promisify(execCb);
async function checkExists(rootDir: string, name: string) {
@@ -26,9 +26,9 @@ import {
addCodeownersEntry,
getCodeownersFilePath,
} from './lib/codeowners';
import { paths } from 'helpers/paths';
import { version } from 'helpers/version';
import { Task, templatingTask } from 'helpers/tasks';
import { paths } from 'lib/paths';
import { version } from 'lib/version';
import { Task, templatingTask } from 'lib/tasks';
const exec = promisify(execCb);
async function checkExists(rootDir: string, id: string) {
+1 -1
View File
@@ -15,7 +15,7 @@
*/
import { Command } from 'commander';
import { run } from 'helpers/run';
import { run } from 'lib/run';
export default async (cmd: Command) => {
const args = ['lint', '--max-warnings=0', '--format=codeframe'];
@@ -22,7 +22,7 @@ import postcss from 'rollup-plugin-postcss';
import imageFiles from 'rollup-plugin-image-files';
import json from '@rollup/plugin-json';
import { RollupWatchOptions } from 'rollup';
import { paths } from 'helpers/paths';
import { paths } from 'lib/paths';
export default {
input: 'src/index.ts',
@@ -15,7 +15,7 @@
*/
import { Command } from 'commander';
import { run } from 'helpers/run';
import { run } from 'lib/run';
export default async (cmd: Command) => {
const args = ['test'];
@@ -17,7 +17,7 @@
import fse from 'fs-extra';
import path from 'path';
import os from 'os';
import { paths } from '../../helpers/paths';
import { paths } from 'lib/paths';
import {
addExportStatement,
capitalize,
@@ -18,8 +18,8 @@ import path from 'path';
import chalk from 'chalk';
import inquirer, { Answers, Question } from 'inquirer';
import { getCodeownersFilePath } from '../create-plugin/lib/codeowners';
import { paths } from 'helpers/paths';
import { Task } from 'helpers/tasks';
import { paths } from 'lib/paths';
import { Task } from 'lib/tasks';
// import os from 'os';
const BACKSTAGE = '@backstage';
+2 -2
View File
@@ -15,8 +15,8 @@
*/
import { Command } from 'commander';
import { paths } from 'helpers/paths';
import { runCheck } from 'helpers/run';
import { paths } from 'lib/paths';
import { runCheck } from 'lib/run';
function includesAnyOf(hayStack: string[], ...needles: string[]) {
for (const needle of needles) {
@@ -21,8 +21,8 @@ import { findAllDeps } from './packages';
import { startWatcher, startPackageWatcher } from './watcher';
import { startCompiler } from './compiler';
import { startChild } from './child';
import { waitForExit, run } from 'helpers/run';
import { paths } from 'helpers/paths';
import { waitForExit, run } from 'lib/run';
import { paths } from 'lib/paths';
import { Command } from 'commander';
const PACKAGE_BLACKLIST = [
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { paths } from 'helpers/paths';
import { paths } from 'lib/paths';
const LernaProject = require('@lerna/project');
const PackageGraph = require('@lerna/package-graph');
+2 -2
View File
@@ -16,8 +16,8 @@
import program from 'commander';
import chalk from 'chalk';
import { exitWithError } from 'helpers/errors';
import { version } from 'helpers/version';
import { exitWithError } from 'lib/errors';
import { version } from 'lib/version';
const main = (argv: string[]) => {
program.name('backstage-cli').version(version);