Skip to content

Commit 40d34f6

Browse files
author
Yarik Bratashchuk
committed
Custom script to install yarn and node, pass versions
1 parent 5bcc88d commit 40d34f6

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.vitepress/constants/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const constants = Object.freeze({
22
golangVersion: "1.22.2",
33

44
nodeVersion: "21.7.2",
5+
yarnVersion: "1.22.19",
56

67
rollkitLatestTag: "v0.13.3",
78
rollkitLatestSha: "45b1573",

public/install-yarn.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@ INSTALL_NODE_VER=21.7.2
66
INSTALL_NVM_VER=0.39.7
77
INSTALL_YARN_VER=1.22.19
88

9-
# You can pass node version as an argument to this script
9+
# You can pass node and yarn versions as arguments to this script
1010
if [ "$1" != '' ]; then
1111
echo "==> Using specified node version - $1"
1212
INSTALL_NODE_VER=$1
1313
fi
14+
if [ "$2" != '' ]; then
15+
echo "==> Using specified yarn version - $2"
16+
INSTALL_YARN_VER=$2
17+
fi
18+
19+
1420

1521
echo "==> Ensuring .bashrc exists and is writable"
1622
touch ~/.bashrc

tutorials/gm-world-frontend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ You will also need Yarn installed for web app development.
1717
If you don't have yarn or nodejs, run this command to install it using cURL on most Linux distros and macOS:
1818

1919
```bash
20-
curl -sSL https://rollkit.dev/install-yarn.sh | sh -s {{constants.nodeVersion}}
20+
curl -sSL https://rollkit.dev/install-yarn.sh | sh -s {{constants.nodeVersion}} {{constants.yarnVersion}}
2121
```
2222
:::
2323

0 commit comments

Comments
 (0)