packages/cli: use src-relative imports
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { run } from '../../helpers/run';
|
||||
import { run } from 'helpers/run';
|
||||
|
||||
export default async () => {
|
||||
const args = ['build'];
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { run } from '../../helpers/run';
|
||||
import { watchDeps } from '../watch-deps';
|
||||
import { run } from 'helpers/run';
|
||||
import { watchDeps } from 'commands/watch-deps';
|
||||
|
||||
export default async () => {
|
||||
const args = ['start'];
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath, relative as relativePath } from 'path';
|
||||
import { runPlain, runCheck } from '../../helpers/run';
|
||||
import { runPlain, runCheck } from 'helpers/run';
|
||||
import { Options } from './options';
|
||||
import { extractArchive, createArchive } from './archive';
|
||||
import { paths } from '../../helpers/paths';
|
||||
import { paths } from 'helpers/paths';
|
||||
|
||||
const INFO_FILE = '.backstage-build-cache';
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { Command } from 'commander';
|
||||
import { run } from '../../helpers/run';
|
||||
import { run } from 'helpers/run';
|
||||
import { Cache } from './cache';
|
||||
import { parseOptions } from './options';
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import { Command } from 'commander';
|
||||
import { paths } from '../../helpers/paths';
|
||||
import { paths } from 'helpers/paths';
|
||||
|
||||
const DEFAULT_MAX_ENTRIES = 10;
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ 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 { Task, templatingTask } from 'helpers/tasks';
|
||||
import { paths } from 'helpers/paths';
|
||||
const exec = promisify(execCb);
|
||||
|
||||
async function checkExists(rootDir: string, name: string) {
|
||||
|
||||
@@ -26,8 +26,8 @@ import {
|
||||
addCodeownersEntry,
|
||||
getCodeownersFilePath,
|
||||
} from './lib/codeowners';
|
||||
import { paths } from '../../helpers/paths';
|
||||
import { Task, templatingTask } from '../../helpers/tasks';
|
||||
import { paths } from 'helpers/paths';
|
||||
import { Task, templatingTask } from 'helpers/tasks';
|
||||
const exec = promisify(execCb);
|
||||
|
||||
async function checkExists(rootDir: string, id: string) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { Command } from 'commander';
|
||||
import { run } from '../helpers/run';
|
||||
import { run } from 'helpers/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 'helpers/paths';
|
||||
|
||||
export default {
|
||||
input: 'src/index.ts',
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { Command } from 'commander';
|
||||
import { run } from '../../helpers/run';
|
||||
import { run } from 'helpers/run';
|
||||
|
||||
export default async (cmd: Command) => {
|
||||
const args = ['test'];
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
*/
|
||||
|
||||
import { Command } from 'commander';
|
||||
import { run } from '../helpers/run';
|
||||
import { paths } from '../helpers/paths';
|
||||
import { run } from 'helpers/run';
|
||||
import { paths } from 'helpers/paths';
|
||||
|
||||
export default async (cmd: Command) => {
|
||||
const args = ['test', '--config', paths.resolveOwn('config/jest.js')];
|
||||
|
||||
@@ -21,8 +21,8 @@ import { getPackageDeps } from './packages';
|
||||
import { startWatcher, startPackageWatcher } from './watcher';
|
||||
import { startCompiler } from './compiler';
|
||||
import { startChild } from './child';
|
||||
import { waitForExit } from '../../helpers/run';
|
||||
import { paths } from '../../helpers/paths';
|
||||
import { waitForExit } from 'helpers/run';
|
||||
import { paths } from 'helpers/paths';
|
||||
|
||||
const PACKAGE_BLACKLIST = [
|
||||
// We never want to watch for changes in the cli, but all packages will depend on it.
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import fs from 'fs';
|
||||
import { promisify } from 'util';
|
||||
import { paths } from '../../helpers/paths';
|
||||
import { paths } from 'helpers/paths';
|
||||
|
||||
const readFile = promisify(fs.readFile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user