Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use yarn instead of npm #186

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,19 @@ chmod a+x "$NODE"
# Add npm and node path so that 1.4's npm-rebuild.js will function.
PATH="$METEOR_DIR/.meteor:`dirname $METEOR_NPM`:$COMPILE_DIR/bin:$PATH"

# install yarn
touch $HOME/.bashrc
curl -o- -L https://yarnpkg.com/install.sh | bash
export PATH="$HOME/.yarn/bin:$PATH"

echo "-----> Using node: `$NODE --version`"
echo "-----> and npm: `$METEOR_NPM --version`"
echo "-----> and yarn: `yarn --version`"

# If we use npm on root, run npm install. Don't use `--production` here, as we
# may need devDependencies (e.g. webpack) in order to build the meteor app.
if [ -e "$APP_SOURCE_DIR"/package.json ]; then
$METEOR_NPM install
yarn install
fi

# Related to https://github.com/meteor/meteor/issues/2796 and
Expand Down Expand Up @@ -203,7 +209,7 @@ rmdir $BUNDLE_DEST
echo "-----> Installing npm production dependencies on built slug"
if [ -e "$COMPILE_DIR"/app/programs/server/package.json ]; then
cd "$COMPILE_DIR"/app/programs/server
$METEOR_NPM install --production
yarn install --production
cd "$APP_SOURCE_DIR"
fi

Expand Down