Skip to content

Commit

Permalink
chore: prepack => build
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Feb 17, 2023
1 parent 0df8b33 commit 6233de1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"private": true,
"type": "module",
"scripts": {
"stub": "pnpm -r run prepack --stub",
"stub": "pnpm -r run build --stub",
"build": "pnpm run build:core && pnpm run build:prompts",
"build:core": "pnpm --filter @clack/core run prepack",
"build:prompts": "pnpm --filter @clack/prompts run prepack",
"build:core": "pnpm --filter @clack/core run build",
"build:prompts": "pnpm --filter @clack/prompts run build",
"start": "pnpm --filter @example/basic run start"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"license": "MIT",
"packageManager": "pnpm@7.6.0",
"scripts": {
"prepack": "unbuild"
"build": "unbuild"
},
"dependencies": {
"picocolors": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/prompts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
],
"packageManager": "pnpm@7.6.0",
"scripts": {
"prepack": "unbuild"
"build": "unbuild"
},
"dependencies": {
"@clack/core": "^0.1.5",
Expand Down

6 comments on commit 6233de1

@privatenumber
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why this change was made?

Using the prepack hook guarantees the packages build on publish, regardless of the tool.

Without it, you have to manually build the packages which adds a point of failure.

@ulken
Copy link
Collaborator

@ulken ulken commented on 6233de1 Mar 2, 2023 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@privatenumber
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the command is in the CI but that's my point.
By relying on a hook, the build can happen automatically on publish. And it doesn't need to be remembered by devs that are testing manually or making changes to the release flow.

Was just curious what the motivation of this change is since it looks like a step back from automation.

@ulken
Copy link
Collaborator

@ulken ulken commented on 6233de1 Mar 2, 2023 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@privatenumber
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that would be great!
I was considering opening a PR but wanted to know the reason behind this so I don't waste time.

What do you suggest I do?

@ulken
Copy link
Collaborator

@ulken ulken commented on 6233de1 Mar 2, 2023 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.