Skip to content

Commit f36fa22

Browse files
committed
When publishing a package, copy README from root folder.
1 parent 8971676 commit f36fa22

5 files changed

Lines changed: 18 additions & 6 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ tsconfig.vitest-temp.json
2525
# type definitions in the project root are copied from types/ folder
2626
# before publishing, so they should be ignored
2727
/*.d.ts
28+
29+
# README is copied from the root folder
30+
packages/wouter/README.md
31+
packages/wouter-preact/README.md

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
"lint-types": "vitest typecheck"
1818
},
1919
"author": "Alexey Taktarov <molefrog@gmail.com>",
20-
"repository": "molefrog/wouter",
20+
"repository": {
21+
"type": "git",
22+
"url": "git+https://github.com/molefrog/wouter.git"
23+
},
2124
"license": "ISC",
2225
"prettier": {
2326
"tabWidth": 2,

packages/wouter-preact/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,14 @@
5454
},
5555
"scripts": {
5656
"build": "rollup -c",
57-
"watch": "rollup -c -w"
57+
"watch": "rollup -c -w",
58+
"prepublishOnly": "npm run build && cp ../../README.md ."
5859
},
5960
"author": "Alexey Taktarov <molefrog@gmail.com>",
60-
"repository": "molefrog/wouter",
61+
"repository": {
62+
"type": "git",
63+
"url": "git+https://github.com/molefrog/wouter.git"
64+
},
6165
"license": "Unlicense",
6266
"peerDependencies": {
6367
"preact": "^10.0.0"

packages/wouter/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
},
5555
"scripts": {
5656
"build": "rollup -c",
57-
"watch": "rollup -c -w"
57+
"watch": "rollup -c -w",
58+
"prepublishOnly": "npm run build && cp ../../README.md ."
5859
},
5960
"author": "Alexey Taktarov <molefrog@gmail.com>",
6061
"repository": {

0 commit comments

Comments
 (0)