Skip to content

Commit

Permalink
Copy README to graphql-hooks on publish (#98)
Browse files Browse the repository at this point in the history
### What does this PR do?
- Ensures the readme appears on npm for `graphql-hooks`
- Copies LICENSE file to packages when publishing
- Updates CONTRIBUTING.md with `NPM_CONFIG_OTP` var

### Checklist

- [x] I have checked the [contributing document](../blob/master/CONTRIBUTING.md)
- [x] I have added or updated any relevant documentation
- [x] I have added or updated any relevant tests
  • Loading branch information
Joezo committed Mar 5, 2019
1 parent 1550110 commit 1c161c8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -60,7 +60,7 @@ For more information on `@all-contributors` see it's [usage docs](https://allcon
### Release process:

- `npm test`
- `npm run release`
- `NPM_CONFIG_OTP=<your-otp> npm run release`

Follow the prompts from [`lerna publish`](https://lernajs.io/#command-publish)

Expand Down
4 changes: 3 additions & 1 deletion packages/graphql-hooks-memcache/package.json
Expand Up @@ -4,7 +4,9 @@
"description": "In memory cache for graphql-hooks",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"prepublishOnly": "cp ../../LICENSE .",
"postpublish": "rm ./LICENSE"
},
"keywords": [
"graphql",
Expand Down
4 changes: 3 additions & 1 deletion packages/graphql-hooks-ssr/package.json
Expand Up @@ -4,7 +4,9 @@
"description": "Server side rendering utils for graphql-hooks",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 0"
"test": "echo \"Error: no test specified\" && exit 0",
"prepublishOnly": "cp ../../LICENSE .",
"postpublish": "rm ./LICENSE"
},
"keywords": [
"graphql",
Expand Down
3 changes: 2 additions & 1 deletion packages/graphql-hooks/package.json
Expand Up @@ -7,7 +7,8 @@
"unpkg": "dist/graphql-hooks.min.js",
"scripts": {
"build": "rollup -c",
"prepublishOnly": "npm run build"
"prepublishOnly": "npm run build && cp ../../README.md . && cp ../../LICENSE .",
"postpublish": "rm README.md && rm LICENSE"
},
"files": [
"dist",
Expand Down

0 comments on commit 1c161c8

Please sign in to comment.