Skip to content

Commit 24dd92e

Browse files
run "link-source" script in development environment only at node renderer package
don't run the "link-source" script on preinstall of the node renderer package when it's installed at a client project and not running in dev environment it depends on checking if yarn.lock file exist at installing directory to check if it's in dev environment
1 parent 0d87ea7 commit 24dd92e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

react_on_rails_pro/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"packages/node-renderer/dist"
104104
],
105105
"scripts": {
106-
"preinstall": "yarn run link-source && yalc add --link react-on-rails",
106+
"preinstall": "(test -f yarn.lock && yarn run link-source && yalc add --link react-on-rails) || true",
107107
"postinstall": "test -f post-yarn-install.local && ./post-yarn-install.local || true",
108108
"link-source": "cd ../packages/react-on-rails && yarn && yalc publish",
109109
"test": "nps test",

0 commit comments

Comments
 (0)