Add npm link script

This commit is contained in:
Kyohei Fukuda
2023-06-10 17:39:34 +09:00
parent a553ef6a99
commit fa1a00c983
2 changed files with 15 additions and 1 deletions

13
link-workspaces.sh Executable file
View File

@@ -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

View File

@@ -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"
}
}
}