Skip to content

Commit

Permalink
fix: publish bug and help messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jakehamilton committed Sep 27, 2020
1 parent 6a1a604 commit f14b67c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/titan/src/commands/add/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ const help = () => {
{bold EXAMPLE}
{dim $ # Add "react" and "redux" as dependencies for all packages.}
{dim $} {bold titan add} react redux
{dim $ # Add "react" as a dependency for all packages in the "@jakehamilton" namespace.}
{dim $} {bold titan add} --scope="^@jakehamilton" react
Expand Down
3 changes: 3 additions & 0 deletions packages/titan/src/commands/create/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const help = () => {
{bold EXAMPLE}
{dim $ # Create a package named "my-library".}
{dim $} {bold titan create} my-library
{dim $ # Create a package at "./cli/my-library".}
{dim $} {bold titan create} my-library ./cli
Expand Down
3 changes: 3 additions & 0 deletions packages/titan/src/commands/exec/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ const help = () => {
{bold EXAMPLE}
{dim $ # Build all packages.}
{dim $} {bold titan exec} -- npm run build
{dim $ # Build only packages in the "@jakehamilton" namespace.}
{dim $} {bold titan exec} --scope="^@jakehamilton" -- npm run build
Expand Down
5 changes: 2 additions & 3 deletions packages/titan/src/commands/publish/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ const command = () => {
for (const tag of npm.dedupe(tags)) {
const { name } = npm.parseNameWithVersion(tag);

const pkg = pkgs.has(name);

if (pkg) {
if (pkgs.has(name)) {
const pkg = pkgs.get(name);
if (args["--dry-run"]) {
log.info(
`Publish package "${pkg.config.name}" at version "${pkg.config.version}".`
Expand Down
1 change: 1 addition & 0 deletions packages/titan/src/util/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const help = () => {
{dim $} {bold titan version} --help
{dim $} {bold titan publish} --help
{dim $} {bold titan exec} --help
{dim $} {bold titan changed} --help
`;

console.log(message);
Expand Down

0 comments on commit f14b67c

Please sign in to comment.