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