0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Added yarn ship for publishing to npm/unpkg

refs https://github.com/TryGhost/members.js/issues/5

We use `yarn ship` across all our packages for publishing new versions.
This commit is contained in:
Rish 2020-04-28 23:38:24 +05:30
parent 4d99e881d7
commit 7fee47b9a7
2 changed files with 6 additions and 3 deletions

View file

@ -85,9 +85,8 @@ See the section about [running tests](https://facebook.github.io/create-react-ap
## Publish ## Publish
Before shipping, please ensure the intended version is updated in `package.json`. - `yarn ship` is an alias for `npm publish`
- Before shipping, please ensure the intended version is updated in `package.json`.
- Run `npm publish --access public` to ship the new version to npm and unpkg.
- Builds the script with latest code using `yarn build` (prePublish) - Builds the script with latest code using `yarn build` (prePublish)
- Publishes package on npm as `@tryghost/members-js` and creates an unpkg link for script at https://unpkg.com/@tryghost/members-js@VERSION - Publishes package on npm as `@tryghost/members-js` and creates an unpkg link for script at https://unpkg.com/@tryghost/members-js@VERSION

View file

@ -10,6 +10,9 @@
"LICENSE", "LICENSE",
"README.md" "README.md"
], ],
"publishConfig": {
"access": "public"
},
"dependencies": { "dependencies": {
"@testing-library/jest-dom": "4.2.4", "@testing-library/jest-dom": "4.2.4",
"@testing-library/react": "9.5.0", "@testing-library/react": "9.5.0",
@ -27,6 +30,7 @@
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject", "eject": "react-scripts eject",
"lint": "eslint src --ext .js --cache", "lint": "eslint src --ext .js --cache",
"ship": "npm publish",
"posttest": "yarn lint", "posttest": "yarn lint",
"prepublishOnly": "yarn build" "prepublishOnly": "yarn build"
}, },