aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts/src/utils.ts')
-rw-r--r--packages/monorepo-scripts/src/utils.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/monorepo-scripts/src/utils.ts b/packages/monorepo-scripts/src/utils.ts
index 73f6260d3..9aa37e272 100644
--- a/packages/monorepo-scripts/src/utils.ts
+++ b/packages/monorepo-scripts/src/utils.ts
@@ -1,4 +1,5 @@
import * as _ from 'lodash';
+import { exec as execAsync, spawn } from 'promisify-child-process';
export const utils = {
log(...args: any[]): void {
@@ -11,4 +12,9 @@ export const utils = {
const newPatchVersion = `${versionSegments[0]}.${versionSegments[1]}.${newPatch}`;
return newPatchVersion;
},
+ async prettifyAsync(filePath: string, cwd: string) {
+ await execAsync(`prettier --write ${filePath} --config .prettierrc`, {
+ cwd,
+ });
+ },
};