From fa1a00c983d91f74493ee59bd8ee470ec00dde46 Mon Sep 17 00:00:00 2001 From: Kyohei Fukuda Date: Sat, 10 Jun 2023 17:39:34 +0900 Subject: [PATCH] Add npm link script --- link-workspaces.sh | 13 +++++++++++++ package.json | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 link-workspaces.sh diff --git a/link-workspaces.sh b/link-workspaces.sh new file mode 100755 index 00000000..9e3631bd --- /dev/null +++ b/link-workspaces.sh @@ -0,0 +1,13 @@ +cd packages + +for dir in $(ls -d */); do + cd "$dir" + npm link + cd .. +done + +for dir in generator ui; do + cd "$dir" + npm link @pdfme/common + cd .. +done diff --git a/package.json b/package.json index 94029a9b..0f57603c 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "packages/*" ], "scripts": { + "postinstall": "./link-workspaces.sh", "clean": "npm run --workspaces clean", "lint": "npm run --workspaces lint", "build": "npm run --workspaces clean && npm run --workspaces build", @@ -51,4 +52,4 @@ "typescript": "^4.5.4", "url-loader": "^4.1.1" } -} +} \ No newline at end of file