@@ -2,7 +2,7 @@ import { Readable } from 'stream';
22
33import { CloseEvent , Command , CommandIdentifier , TimerEvent } from './command' ;
44import {
5- concurrently ,
5+ concurrently as createConcurrently ,
66 ConcurrentlyCommandInput ,
77 ConcurrentlyOptions as BaseConcurrentlyOptions ,
88 ConcurrentlyResult ,
@@ -91,10 +91,10 @@ export type ConcurrentlyOptions = BaseConcurrentlyOptions & {
9191 additionalArguments ?: string [ ] ;
9292} ;
9393
94- export default (
94+ export function concurrently (
9595 commands : ConcurrentlyCommandInput [ ] ,
9696 options : Partial < ConcurrentlyOptions > = { } ,
97- ) => {
97+ ) {
9898 const logger = new Logger ( {
9999 hide : options . hide ,
100100 prefixFormat : options . prefix ,
@@ -103,7 +103,7 @@ export default (
103103 timestampFormat : options . timestampFormat ,
104104 } ) ;
105105
106- return concurrently ( commands , {
106+ return createConcurrently ( commands , {
107107 maxProcesses : options . maxProcesses ,
108108 raw : options . raw ,
109109 successCondition : options . successCondition ,
@@ -141,28 +141,26 @@ export default (
141141 prefixColors : options . prefixColors || [ ] ,
142142 additionalArguments : options . additionalArguments ,
143143 } ) ;
144- } ;
144+ }
145145
146146// Export all flow controllers, types, and the main concurrently function,
147147// so that 3rd-parties can use them however they want
148+
149+ // Main
150+ export { ConcurrentlyCommandInput , ConcurrentlyResult , createConcurrently , Logger } ;
151+
152+ // Command specific
153+ export { CloseEvent , Command , CommandIdentifier , TimerEvent } ;
154+
155+ // Flow controllers
148156export {
149- CloseEvent ,
150- // Command specific
151- Command ,
152- CommandIdentifier ,
153- concurrently ,
154- ConcurrentlyCommandInput ,
155- ConcurrentlyResult ,
156- // Flow controllers
157157 FlowController ,
158158 InputHandler ,
159159 KillOnSignal ,
160160 KillOthers ,
161161 LogError ,
162162 LogExit ,
163- Logger ,
164163 LogOutput ,
165164 LogTimings ,
166165 RestartProcess ,
167- TimerEvent ,
168166} ;
0 commit comments