Skip to content

Commit

Permalink
feat(bootstrap): add --no-save option
Browse files Browse the repository at this point in the history
  • Loading branch information
jakehamilton committed Nov 24, 2020
1 parent 69e01bb commit 33e7a15
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/titan/src/commands/bootstrap/args.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const getArgs = () =>

"--tagged": Boolean,
"-t": "--tagged",

"--no-save": Boolean,
"-S": "--no-save",
});

module.exports = getArgs;
4 changes: 4 additions & 0 deletions packages/titan/src/commands/bootstrap/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const help = () => {
--scope, -s Set the scope regex to match against
--changed, -c Only run for packages that have changed
--tagged, -t Only run for packages that are tagged on HEAD
--no-save, -S Run npm with the "--no-save" option
{bold EXAMPLE}
Expand All @@ -30,6 +31,9 @@ const help = () => {
{dim $ # Install dependencies for packages with releases.}
{dim $} {bold titan bootstrap} --tagged
{dim $ # Install dependencies but don't modify "package-lock.json" files.}
{dim $} {bold titan bootstrap} --no-save
`;

console.log(message);
Expand Down
6 changes: 5 additions & 1 deletion packages/titan/src/commands/bootstrap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ const command = () => {
log.info(`Installing dependencies for "${pkg.config.name}".`);
}

npm.install(pkg.path);
if (args["--no-save"]) {
npm.install(pkg.path, ["--no-save"]);
} else {
npm.install(pkg.path);
}
}
});
};
Expand Down

0 comments on commit 33e7a15

Please sign in to comment.