Skip to content

Commit

Permalink
fix: add monorepo config (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunjae Lee authored Sep 8, 2019
1 parent 292625e commit 744cfc4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ship.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ const fs = require("fs");
const path = require("path");

module.exports = {
monorepo: {
readVersionFrom: "package.json",
packagesToBump: ["packages/*"],
packagesToPublish: ["packages/*"]
},
versionUpdated: ({ version, dir, exec }) => {
const updateVersion = (filePath, expression) => {
exec(`npx json -I -f ${filePath} -e '${expression} = "${version}"'`);
Expand All @@ -19,7 +24,7 @@ module.exports = {
// update `version.js`
fs.writeFileSync(
path.resolve(dir, "packages/shipjs/src/version.js"),
"export default '${version}';"
`export default '${version}';`
);
},
beforeCommitChanges: ({ exec }) => {
Expand Down

0 comments on commit 744cfc4

Please sign in to comment.