Skip to content

Commit

Permalink
Migrate to Bun
Browse files Browse the repository at this point in the history
  • Loading branch information
yndajas committed Dec 2, 2023
1 parent 04c33d7 commit bdb977f
Show file tree
Hide file tree
Showing 9 changed files with 1,505 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ jobs:
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install Bun
uses: oven-sh/setup-bun@v1
- name: Build
run: script/build --ci-environment
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install Bun
uses: oven-sh/setup-bun@v1
- name: Build
run: script/build --ci-environment
- name: Set up Pages
Expand Down
1 change: 0 additions & 1 deletion .node-version

This file was deleted.

3 changes: 3 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
brew "fswatch"

tap "oven-sh/bun"
brew "bun"
86 changes: 86 additions & 0 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"entries": {
"brew": {
"fswatch": {
"version": "1.17.1",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_sonoma": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fswatch/blobs/sha256:0a46b04e0ff340c1de3f55e46cb7785cd12de3bba2235d463e6d462672a2a102",
"sha256": "0a46b04e0ff340c1de3f55e46cb7785cd12de3bba2235d463e6d462672a2a102"
},
"arm64_ventura": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fswatch/blobs/sha256:96cea06f4891e9af44abcd6f30a250c8efebe660104893b7fd80c8f22b2ab569",
"sha256": "96cea06f4891e9af44abcd6f30a250c8efebe660104893b7fd80c8f22b2ab569"
},
"arm64_monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fswatch/blobs/sha256:b7f5facb15c82b5dc9eb94e8cfaa4857e562609be24fdd716051c35bd2e85e8b",
"sha256": "b7f5facb15c82b5dc9eb94e8cfaa4857e562609be24fdd716051c35bd2e85e8b"
},
"arm64_big_sur": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fswatch/blobs/sha256:ec08b3bf8f659a864d0c54f022939b45ea647c25769a8ab908f60f28ffbd803c",
"sha256": "ec08b3bf8f659a864d0c54f022939b45ea647c25769a8ab908f60f28ffbd803c"
},
"sonoma": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fswatch/blobs/sha256:46597af58009af46050cb5885477777234020038ce3554aaad42c4e5bb337e0d",
"sha256": "46597af58009af46050cb5885477777234020038ce3554aaad42c4e5bb337e0d"
},
"ventura": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fswatch/blobs/sha256:570223c980f22c296e4d6fa6e6058e778bb0e74d0dd9745ec49ec3940aeb5863",
"sha256": "570223c980f22c296e4d6fa6e6058e778bb0e74d0dd9745ec49ec3940aeb5863"
},
"monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fswatch/blobs/sha256:6c57d2ea9ff9e425069580bba25c74f5890f454b807f4a94810271909d47283e",
"sha256": "6c57d2ea9ff9e425069580bba25c74f5890f454b807f4a94810271909d47283e"
},
"big_sur": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fswatch/blobs/sha256:1da6e45f4051477e02acbf2f3d13a7917b8a80a38ca35d6ac8cbaff780df4651",
"sha256": "1da6e45f4051477e02acbf2f3d13a7917b8a80a38ca35d6ac8cbaff780df4651"
},
"catalina": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/fswatch/blobs/sha256:c97ee3973b847257ad99f6ffff3c6ba3d33dbf2a333e0bbe289832b7e490f051",
"sha256": "c97ee3973b847257ad99f6ffff3c6ba3d33dbf2a333e0bbe289832b7e490f051"
},
"x86_64_linux": {
"cellar": "/home/linuxbrew/.linuxbrew/Cellar",
"url": "https://ghcr.io/v2/homebrew/core/fswatch/blobs/sha256:60e3f628f00ace185e22523a1850f0521184e7477263ef69a1a0fcebd8b0f077",
"sha256": "60e3f628f00ace185e22523a1850f0521184e7477263ef69a1a0fcebd8b0f077"
}
}
}
},
"bun": {
"version": "1.0.14",
"bottle": false
}
},
"tap": {
"oven-sh/bun": {
"revision": "6b8b0ff07edf9b0cd4fa65e62860f4bbd86f0e05"
}
}
},
"system": {
"macos": {
"sonoma": {
"HOMEBREW_VERSION": "4.1.22",
"HOMEBREW_PREFIX": "/opt/homebrew",
"Homebrew/homebrew-core": "api",
"CLT": "15.0.0.0.1.1694021235",
"Xcode": "15.0",
"macOS": "14.1.1"
}
}
}
}
2 changes: 2 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[install.lockfile]
print = "yarn"
5 changes: 3 additions & 2 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ done
echo "==> Installing dependencies"

if [ "$CI" = false ]; then
nodenv install --skip-existing
echo "==> Installing Homebrew packages: Bun and fswatch..."
brew bundle install
fi

npm install
echo "==> Installing Bun dependencies"
bun install
4 changes: 2 additions & 2 deletions script/build
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ cp -r views/admin _site

echo "==> Formatting HTML"

npx prettier --write _site/**/*.html
bunx prettier --write _site/**/*.html

echo "==> Copying assets"

cp -r assets _site/assets

echo "==> Formatting CSS"

npx stylelint --fix "_site/assets/styles/*.css"
bunx stylelint --fix "_site/assets/styles/*.css"

echo "Completed build"
Loading

0 comments on commit bdb977f

Please sign in to comment.