Skip to content

Commit 16b900d

Browse files
committed
maint: Add postinstall script to upgrade dev.
Note: the "make upgrade" target is run in the directory where npm install is invoked. If you install "@patternslib/dev" as a dependency in "@pattersnlib/patternslib", the Patternslib project is upgraded.
1 parent c5fbf37 commit 16b900d

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,5 @@ serve: install
171171
$(YARN) run start
172172

173173

174-
#
174+
upgrade:
175+
@# Upgrade target, depends on other upgrades

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
# Development helpers and config for Patternslib and add-ons.
22

3+
This repository includes base files which are extended in Patternslib, Mockup or other projects.
4+
5+
It includes a Makefile which helps in installing and releasing packages.
6+
7+
## Upgrading
8+
9+
Run `make upgrade` in your project.
10+
11+
Alternatively, if there is a new `@patternslib/dev` version installed, the `postinstall` package.json script will automatically run `make upgrade` in the directory where package installer was invoked, that is your project directory which depends on `@patternslib/dev`.
12+
13+
314
## Code style
415

5-
The release process based on release-it includes automatic changelog generation via conventional-commit, commitlint and a pre-commit hook by husky.
16+
The release process based on release-it includes automatic changelog generation via conventional-commit, commitlint and a git pre-commit hook.
617
Please check the [code style guide](https://github.com/Patternslib/Patterns/blob/master/docs/developer/styleguide.md#commits-messages) for the commit specification!
7-

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"node": ">=18.18"
3838
},
3939
"scripts": {
40+
"postinstall": "cd $INIT_CWD && make upgrade",
4041
"test": "jest"
4142
},
4243
"author": {

0 commit comments

Comments
 (0)