aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/publish.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/publish.ts
parent2a6a71ea6cd89d39142f51530d06e80ffc44e722 (diff)
downloaddexon-sol-tools-3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a.tar
dexon-sol-tools-3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a.tar.gz
dexon-sol-tools-3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a.tar.bz2
dexon-sol-tools-3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a.tar.lz
dexon-sol-tools-3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a.tar.xz
dexon-sol-tools-3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a.tar.zst
dexon-sol-tools-3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a.zip
Move prettify command to utils and also call it on CHANGELOG.md
Diffstat (limited to 'packages/monorepo-scripts/src/publish.ts')
-rw-r--r--packages/monorepo-scripts/src/publish.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index 2263e2f8c..30e5bd0e1 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -78,14 +78,13 @@ const semverNameToIndex: { [semver: string]: number } = {
// Save updated CHANGELOG.json
fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs));
- await execAsync(`prettier --write ${changelogJSONPath} --config .prettierrc`, {
- cwd: constants.monorepoRootPath,
- });
+ await utils.prettifyAsync(changelogJSONPath, constants.monorepoRootPath);
utils.log(`${packageName}: Updated CHANGELOG.json`);
// Generate updated CHANGELOG.md
const changelogMd = generateChangelogMd(changelogs);
const changelogMdPath = path.join(lernaPackage.location, 'CHANGELOG.md');
fs.writeFileSync(changelogMdPath, changelogMd);
+ await utils.prettifyAsync(changelogMdPath, constants.monorepoRootPath);
utils.log(`${packageName}: Updated CHANGELOG.md`);
}