Skip to content

Commit

Permalink
Move back to yarn and node
Browse files Browse the repository at this point in the history
  • Loading branch information
yatish27 committed May 15, 2024
1 parent 639d330 commit a001409
Show file tree
Hide file tree
Showing 9 changed files with 1,265 additions and 20 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22.1.0
5 changes: 2 additions & 3 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ brew "curl"
# Overmind (requires tmux)
brew "tmux"
brew "overmind"

tap "oven-sh/bun"
brew "bun"
brew "node"
brew "yarn"
102 changes: 102 additions & 0 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,108 @@
}
}
}
},
"curl": {
"version": "8.7.1",
"bottle": {
"rebuild": 2,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_sonoma": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/curl/blobs/sha256:d26dcef01fd3158c59dec70673ebbdcecc44bdffc51b735a45d018f3046d0dfd",
"sha256": "d26dcef01fd3158c59dec70673ebbdcecc44bdffc51b735a45d018f3046d0dfd"
},
"arm64_ventura": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/curl/blobs/sha256:abef4ff5922a5046cf31afc38dcdfec4cce7985a93d997276a8a9fe822782103",
"sha256": "abef4ff5922a5046cf31afc38dcdfec4cce7985a93d997276a8a9fe822782103"
},
"arm64_monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/curl/blobs/sha256:562cd9cf121cb54692bdaade8319bc070421c426779fdfd4e7d9ce59d81e304c",
"sha256": "562cd9cf121cb54692bdaade8319bc070421c426779fdfd4e7d9ce59d81e304c"
},
"sonoma": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/curl/blobs/sha256:c98c05f1441d74c327717bddf1e4ea0d914a2f325550885c6b5084d6f03875ef",
"sha256": "c98c05f1441d74c327717bddf1e4ea0d914a2f325550885c6b5084d6f03875ef"
},
"ventura": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/curl/blobs/sha256:30c589452ee996815867e03b5104b7464b2580a991cb686d69485ab7c2348984",
"sha256": "30c589452ee996815867e03b5104b7464b2580a991cb686d69485ab7c2348984"
},
"monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/curl/blobs/sha256:26ea8f03d564d0b7fb27dc9416bf989fb012185636e8cabf8bd6680b11b9dfdf",
"sha256": "26ea8f03d564d0b7fb27dc9416bf989fb012185636e8cabf8bd6680b11b9dfdf"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/curl/blobs/sha256:5f439e638e5fb4c63c8aa359eb5effd351fb8f3a6e59736281544cd1d739dc4f",
"sha256": "5f439e638e5fb4c63c8aa359eb5effd351fb8f3a6e59736281544cd1d739dc4f"
}
}
}
},
"node": {
"version": "22.1.0",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_sonoma": {
"cellar": "/opt/homebrew/Cellar",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:3944cf234af633b7e974ea1d743884ff5221b29533c622a77f079ee7d5d5bd28",
"sha256": "3944cf234af633b7e974ea1d743884ff5221b29533c622a77f079ee7d5d5bd28"
},
"arm64_ventura": {
"cellar": "/opt/homebrew/Cellar",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:928e0563418819802cceb47aecadaa8ac7afb17afb25d5635da899aec0800544",
"sha256": "928e0563418819802cceb47aecadaa8ac7afb17afb25d5635da899aec0800544"
},
"arm64_monterey": {
"cellar": "/opt/homebrew/Cellar",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:f2bd3bcebad3b014c85ee75ead5cfe21e1c3e2ff341e91a36c8e4814d2e5cd65",
"sha256": "f2bd3bcebad3b014c85ee75ead5cfe21e1c3e2ff341e91a36c8e4814d2e5cd65"
},
"sonoma": {
"cellar": "/usr/local/Cellar",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:ac64cf028d2b5b9008f0d92ee2996a7f3835b839bfa067a8bb8312accc0a7e2e",
"sha256": "ac64cf028d2b5b9008f0d92ee2996a7f3835b839bfa067a8bb8312accc0a7e2e"
},
"ventura": {
"cellar": "/usr/local/Cellar",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:e1654a5fd25ad3d8f5b94b1f33c8184e679fca9df944366dad33927671ae839d",
"sha256": "e1654a5fd25ad3d8f5b94b1f33c8184e679fca9df944366dad33927671ae839d"
},
"monterey": {
"cellar": "/usr/local/Cellar",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:51d018fc2546c8a9d333d708bacd24105ca51ded191829b06aa5f91414373dff",
"sha256": "51d018fc2546c8a9d333d708bacd24105ca51ded191829b06aa5f91414373dff"
},
"x86_64_linux": {
"cellar": "/home/linuxbrew/.linuxbrew/Cellar",
"url": "https://ghcr.io/v2/homebrew/core/node/blobs/sha256:515698eb8b210d25aa64a1d19bdb646eb9ee1f3259789fa7c33c0fe8079b2564",
"sha256": "515698eb8b210d25aa64a1d19bdb646eb9ee1f3259789fa7c33c0fe8079b2564"
}
}
}
},
"yarn": {
"version": "1.22.22",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"all": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/yarn/blobs/sha256:9a80ed679d05f019e217f737a7d531f4578144b65be6a1a19d3322ef41d25683",
"sha256": "9a80ed679d05f019e217f737a7d531f4578144b65be6a1a19d3322ef41d25683"
}
}
}
}
},
"tap": {
Expand Down
12 changes: 8 additions & 4 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ ENV BUNDLE_PATH /usr/local/bundle
ENV BUNDLE_PATH /usr/local/bundle
ENV GEM_PATH /usr/local/bundle
ENV GEM_HOME /usr/local/bundle
ENV BUN_INSTALL /usr/local/bun
ENV PATH $BUN_INSTALL/bin:$PATH
ENV NODE_VERSION=22.1.0
ENV YARN_VERSION=latest
ENV PATH=/usr/local/node/bin:$PATH

COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh

Expand All @@ -20,7 +21,10 @@ apt-get update
apt-get install -y build-essential libpq-dev curl unzip
EOF

RUN curl -fsSL https://bun.sh/install | bash -s -- "bun-v${BUN_VERSION}"
RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
/tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \
npm install -g yarn@$YARN_VERSION && \
rm -rf /tmp/node-build-master

RUN gem install bundler --version "$BUNDLE_VERSION"

Expand All @@ -30,7 +34,7 @@ COPY Gemfile Gemfile.lock ./
COPY package.json ./

RUN bundle check || bundle install --jobs=8
RUN bun install
RUN yarn install

COPY . .

Expand Down
11 changes: 4 additions & 7 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,11 @@ FileUtils.chdir APP_ROOT do
system("bundle check") || system!("bundle install")
puts "Gems installed".green

puts "\n== Installing packages using Bun =="
if command?("bun")
system!("bun install")
puts "Packages installed".green
puts "\n== Installing packages using yarn=="
if command?("yarn") && `yarn -v`.to_f < 2
system("yarn check") || system!("yarn install")
else
puts "Bun is not installed. Install bun using `brew install oven-sh/bun/bun`".red
puts "Visit https://bun.sh/docs/installation for more information.".red
exit 1
system!("yarn install")
end

puts "\n== Preparing database =="
Expand Down
5 changes: 0 additions & 5 deletions bin/shims/vite

This file was deleted.

Binary file removed bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
},
"devDependencies": {
"tailwindcss": "^3.4.3"
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
Loading

0 comments on commit a001409

Please sign in to comment.