Skip to content

Commit

Permalink
F2: Frontend setup (#585)
Browse files Browse the repository at this point in the history
* Install bun

* Clean up

* Install `redis` gem for assets generation

* Add a .keep

* Option to minify JS
  • Loading branch information
dreikanter authored Oct 17, 2024
1 parent d130d4c commit 87c79d0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ RUN apt-get update --yes \
build-essential \
less \
vim \
curl \
&& gem install bundler:'~> 2.5' \
&& rm -rf /var/lib/apt/lists/*

RUN curl -fsSL https://bun.sh/install | bash

ENV PATH="/root/.bun/bin:${PATH}"

ARG RAILS_ENV
ARG DATABASE_URL

Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ gem "pry-byebug"
gem "pry-rails", "~> 0.3.9"
gem "puma", "~> 6.4"
gem "rails", "~> 8.0.0.beta1"
gem "redis", "~> 5.3"
gem "rexml", ">= 3.3.4" # No direct dependency; added to mitigate a CVE
gem "rss"
# gem "stimulus-rails"
Expand Down
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ GEM
rake (13.2.1)
rdoc (6.7.0)
psych (>= 4.0.0)
redis (5.3.0)
redis-client (>= 0.22.0)
redis-client (0.22.2)
connection_pool
reek (6.3.0)
dry-schema (~> 1.13.0)
parser (~> 3.3.0)
Expand Down Expand Up @@ -409,6 +413,7 @@ DEPENDENCIES
pry-rails (~> 0.3.9)
puma (~> 6.4)
rails (~> 8.0.0.beta1)
redis (~> 5.3)
reek (~> 6.3)
rexml (>= 3.3.4)
rspec-rails (~> 6.1)
Expand Down
Empty file removed app/assets/builds/.keep
Empty file.
2 changes: 1 addition & 1 deletion app/services/feed_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def perform
feeds.each do |feed|
Importer.new(feed).import
Publisher.new(posts: feed.posts.pending).publish
# TBD: HAndle errors
# TBD: Handle errors
end
end
end
1 change: 1 addition & 0 deletions bun.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const config = {
sourcemap: "external",
entrypoints: ["app/javascript/application.js"],
outdir: path.join(process.cwd(), "app/assets/builds"),
// minify: true
};

const build = async (config) => {
Expand Down

0 comments on commit 87c79d0

Please sign in to comment.