aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/utils.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-02 14:53:31 +0800
committerFabio Berger <me@fabioberger.com>2018-04-02 14:53:31 +0800
commit3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a (patch)
tree49dc4031787929b015b25e0f70aa94ee4fe24050 /packages/monorepo-scripts/src/utils.ts
parent2a6a71ea6cd89d39142f51530d06e80ffc44e722 (diff)
downloaddexon-0x-contracts-3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a.tar.gz
dexon-0x-contracts-3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a.tar.zst
dexon-0x-contracts-3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a.zip
Move prettify command to utils and also call it on CHANGELOG.md
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,
+ });
+ },
};