@gobstones/gobstones-scripts
Version:
Scripts to abstract away build configuration of Gobstones Project's libraries and modules.
45 lines • 1.21 kB
TypeScript
/**
* The definition for a concurrently run script.
*/
export interface ConcurrentScriptDefinition {
/**
* The actual bash script command to run.
*/
script: string;
/**
* The color to use when prefixing this script.
*/
color?: string;
}
/**
* Represent a concurrent script to run.
*/
export type ConcurrentScript = ConcurrentScriptDefinition | string;
/**
* Generates a bash command that uses `concurrently` to run
* scripts concurrently. Adds a few flags to make it
* behave as you probably want (like --kill-others-on-fail).
* In addition, it adds color and labels where the color
* can be specified or is defaulted and the label is based
* on the key for the script.
*
* @param scripts - The scripts to run.
*
* @example
* // returns a bit of a long script that can vary slightly
* // based on your environment...
* concurrent({
* lint: {
* script: 'eslint .',
* color: 'bgGreen.white.dim',
* },
* test: 'jest',
* build: {
* script: 'webpack'
* }
* })
*
* @return The bash command string.
*/
export declare const concurrently: (scripts: Record<string, ConcurrentScript>) => string;
//# sourceMappingURL=concurrently.d.ts.map