Skip to content

Commit 106988d

Browse files
authored
Change package manager to yarn (#374)
* chore: install dependencies using yarn * chore: change references of npm command to yarn * chore: use npm for workers-site * chore: revert workers-site changes * fix: pin gatsby-plugin-google-tagmanager and gatsby-plugin-typescript versions to avoid plugin incompatibility issue Co-authored-by: Temitayo Fadojutimi <temitayo.fadojutimi@cloudflare.com>
1 parent 94e11df commit 106988d

File tree

5 files changed

+16117
-2033
lines changed

5 files changed

+16117
-2033
lines changed

bin/commands.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ if [ "$1" = "ghactionsbootstrap" ]; then
3434
echo "Entering .docs"
3535
cd .docs
3636

37-
echo "Running npm install inside .docs"
38-
npm install
37+
echo "Running yarn install inside .docs"
38+
yarn install --pure-lockfile
3939
fi
4040

4141

@@ -51,11 +51,11 @@ if [ "$1" = "bootstrap" ]; then
5151
echo "Entering .docs"
5252
cd .docs
5353

54-
echo "Removing existing node_modules (local npm link case)"
54+
echo "Removing existing node_modules (local yarn link case)"
5555
rm -rf node_modules/
5656

57-
echo "Running npm install inside .docs"
58-
npm install
57+
echo "Running yarn install inside .docs"
58+
yarn install --pure-lockfile
5959
fi
6060

6161

@@ -89,11 +89,11 @@ if [ "$1" = "develop" ]; then
8989
echo "Entering .docs"
9090
cd .docs
9191

92-
echo "Running npm run clean"
93-
npm run clean
92+
echo "Running yarn clean"
93+
yarn clean
9494

95-
echo "Running npm run develop"
96-
npm run develop -- "${@:2}"
95+
echo "Running yarn develop"
96+
yarn develop "${@:2}"
9797
fi
9898

9999

@@ -105,8 +105,8 @@ if [ "$1" = "build" ]; then
105105
echo "Entering .docs"
106106
cd .docs
107107

108-
echo "Running npm run build"
109-
npm run build -- "${@:2}"
108+
echo "Running yarn build"
109+
yarn build "${@:2}"
110110

111111
# We must run from inside `.docs/`
112112
echo "Running bin/postbuild.js"
@@ -120,8 +120,8 @@ if [ "$1" = "serve" ]; then
120120
echo "Entering .docs"
121121
cd .docs
122122

123-
echo "Running npm run serve"
124-
npm run serve -- "${@:2}"
123+
echo "Running yarn serve"
124+
yarn serve "${@:2}"
125125
fi
126126

127127

0 commit comments

Comments
 (0)