Skip to content

Commit

Permalink
refactor(public, commands): removes internal kpo commands from public…
Browse files Browse the repository at this point in the history
…, moves them to commands

BREAKING CHANGE: run, list, raise, and stream are no longer exported
  • Loading branch information
rafamel committed May 7, 2019
1 parent 1508fc4 commit 7acaea6
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/bin/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import chalk from 'chalk';
import join from 'command-join';
import core from '~/core';
import { TLogger, IOfType } from '~/types';
import { run } from '~/public';
import { run } from '~/commands';
import _cmd from './cmd';
import series from './series';
import parallel from './parallel';
Expand Down
2 changes: 1 addition & 1 deletion src/bin/main/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { stripIndent as indent } from 'common-tags';
import arg from 'arg';
import { flags, safePairs } from 'cli-belt';
import { list as command } from '~/public';
import { list as command } from '~/commands';

export default async function list(argv: string[]): Promise<void> {
const help = indent`
Expand Down
2 changes: 1 addition & 1 deletion src/bin/main/raise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { stripIndent as indent } from 'common-tags';
import arg from 'arg';
import { flags, safePairs } from 'cli-belt';
import { raise as command } from '~/public';
import { raise as command } from '~/commands';

export default async function list(argv: string[]): Promise<void> {
const help = indent`
Expand Down
2 changes: 1 addition & 1 deletion src/bin/main/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { stripIndent as indent } from 'common-tags';
import arg from 'arg';
import { flags, safePairs } from 'cli-belt';
import { stream as command } from '~/public';
import { stream as command } from '~/commands';

export default async function stream(argv: string[]): Promise<void> {
const help = indent`
Expand Down
1 change: 1 addition & 0 deletions src/public/kpo/index.ts → src/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as run } from './run';
export { default as list } from './list';
export { default as raise } from './raise';
export { default as stream } from './stream';
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions src/public/exec/stream.ts → src/commands/stream.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import core from '~/core';
import expose from '~/utils/expose';
import { IChild } from '~/core/types';
import parallel from './parallel';
import series from './series';
import { parallel, series } from '~/public';
import join from 'command-join';
import { NODE_PATH, KPO_PATH } from '~/constants';
import { IMultiExecOptions } from '~/types';
Expand Down
1 change: 0 additions & 1 deletion src/core/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { ILoaded, IPaths } from './types';
import { IOfType, IPackageOptions } from '~/types';
import options from './options';
import { absolute } from '~/utils/file';
import * as _public from '../public';

export default async function load(paths: IPaths): Promise<ILoaded> {
// pkg must be loaded first to set options first, if present at key `kpo`
Expand Down
1 change: 0 additions & 1 deletion src/public/exec/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default as parallel } from './parallel';
export { default as series } from './series';
export { default as stream } from './stream';
1 change: 0 additions & 1 deletion src/public/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './exec';
export * from './fs';
export * from './kpo';
export * from './prompts';
export * from './tags';

0 comments on commit 7acaea6

Please sign in to comment.