Skip to content

Commit a80c4d0

Browse files
committed
Move build to prepack
From [Yarn docs about lifecycle scripts](https://yarnpkg.com/advanced/lifecycle-scripts): > Note about yarn pack: Although rarely called directly, yarn pack is a crucial part of Yarn. Each time Yarn has to fetch a dependency from a "raw" source (such as a Git repository), it will automatically run yarn install and yarn pack on it to know which are the files to use. I have found this change to be helpful when trying to install Redux using [the Git protocol](https://yarnpkg.com/features/protocols#git) in order to test out changes on a specific branch. `prepack` is run as part of a [`npm/yarn publish`](https://docs.npmjs.com/cli/v9/using-npm/scripts#npm-publish) so this change should hopefully not change anything about publishing.
1 parent c9204ee commit a80c4d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"test:watch": "vitest",
5454
"test:cov": "vitest --coverage",
5555
"build": "rollup -c",
56-
"prepublishOnly": "yarn clean && yarn check-types && yarn format:check && yarn lint && yarn test && yarn build",
56+
"prepack": "yarn build",
57+
"prepublishOnly": "yarn clean && yarn check-types && yarn format:check && yarn lint && yarn test",
5758
"examples:lint": "eslint --ext js,ts examples",
5859
"examples:test": "cross-env CI=true babel-node examples/testAll.js",
5960
"tsc": "tsc"

0 commit comments

Comments
 (0)