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

Convert to Bridgetown #93

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions .eslintrc

This file was deleted.

7 changes: 5 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

# Maintain dependencies for npm
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "bundler"
directory: "/"
schedule:
interval: "daily"
31 changes: 16 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: tests
on:
- push
- push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18.x
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install-test
env:
CI: true
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
- run: npm ci
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- run: bundle exec bridgetown frontend:build
- run: bundle exec bridgetown build
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/node_modules
/.eslintcache

/dist
/.gems
/.bridgetown-cache
/compact_index
/output
/tmp
/.envrc
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem "bridgetown", "~> 2.0.0.beta2"
gem "puma"
170 changes: 170 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.2.2.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
amazing_print (1.7.2)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.9)
bridgetown (2.0.0.beta4)
bridgetown-builder (= 2.0.0.beta4)
bridgetown-core (= 2.0.0.beta4)
bridgetown-foundation (= 2.0.0.beta4)
bridgetown-paginate (= 2.0.0.beta4)
bridgetown-builder (2.0.0.beta4)
bridgetown-core (= 2.0.0.beta4)
bridgetown-core (2.0.0.beta4)
activesupport (>= 6.0, < 8.0)
addressable (~> 2.4)
amazing_print (~> 1.2)
bridgetown-foundation (= 2.0.0.beta4)
csv (~> 3.2)
dry-inflector (>= 1.0)
erubi (~> 1.9)
faraday (~> 2.0)
faraday-follow_redirects (~> 0.3)
i18n (~> 1.0)
irb (>= 1.14)
kramdown (~> 2.1)
kramdown-parser-gfm (~> 1.0)
liquid (>= 5.0, < 5.5)
listen (~> 3.0)
rack (>= 3.0)
rackup (~> 2.0)
rake (>= 13.0)
roda (~> 3.46)
rouge (>= 3.0, < 5.0)
serbea (~> 2.1)
signalize (~> 1.3)
streamlined (>= 0.6.0)
thor (~> 1.1)
tilt (~> 2.0)
zeitwerk (~> 2.5)
bridgetown-foundation (2.0.0.beta4)
hash_with_dot_access (~> 2.0)
inclusive (~> 1.0)
zeitwerk (~> 2.5)
bridgetown-paginate (2.0.0.beta4)
bridgetown-core (= 2.0.0.beta4)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
csv (3.3.2)
date (3.4.1)
drb (2.2.1)
dry-inflector (1.2.0)
erubi (1.13.1)
faraday (2.12.2)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
ffi (1.17.1)
ffi (1.17.1-aarch64-linux-gnu)
ffi (1.17.1-aarch64-linux-musl)
ffi (1.17.1-arm-linux-gnu)
ffi (1.17.1-arm-linux-musl)
ffi (1.17.1-arm64-darwin)
ffi (1.17.1-x86-linux-gnu)
ffi (1.17.1-x86-linux-musl)
ffi (1.17.1-x86_64-darwin)
ffi (1.17.1-x86_64-linux-gnu)
ffi (1.17.1-x86_64-linux-musl)
hash_with_dot_access (2.1.1)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
inclusive (1.0.0)
io-console (0.8.0)
irb (1.15.1)
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.9.1)
kramdown (2.5.1)
rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (5.4.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.5)
minitest (5.25.4)
net-http (0.6.0)
uri
nio4r (2.7.4)
pp (0.6.2)
prettyprint
prettyprint (0.2.0)
psych (5.2.3)
date
stringio
public_suffix (6.0.1)
puma (6.5.0)
nio4r (~> 2.0)
rack (3.1.8)
rackup (2.2.1)
rack (>= 3)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rdoc (6.11.0)
psych (>= 4.0.0)
reline (0.6.0)
io-console (~> 0.5)
rexml (3.4.0)
roda (3.88.0)
rack
rouge (4.5.1)
securerandom (0.4.1)
serbea (2.2.0)
erubi (>= 1.10)
tilt (~> 2.0)
signalize (1.3.0)
concurrent-ruby (~> 1.2)
streamlined (0.6.0)
serbea (>= 2.1)
zeitwerk (~> 2.5)
stringio (3.1.2)
thor (1.3.2)
tilt (2.6.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uri (1.0.2)
zeitwerk (2.7.1)

PLATFORMS
aarch64-linux-gnu
aarch64-linux-musl
arm-linux-gnu
arm-linux-musl
arm64-darwin
ruby
x86-linux-gnu
x86-linux-musl
x86_64-darwin
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
bridgetown (~> 2.0.0.beta2)
puma

BUNDLED WITH
2.5.11
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
[![Netlify
Status](https://api.netlify.com/api/v1/badges/79fe58f2-05cd-4e71-9563-703a16605716/deploy-status)](https://app.netlify.com/sites/faucet-pipeline/deploys)

# faucet-pipeline Documentation

This repository contains the documentation for the faucet-pipeline project.
The documentation can be found at:

[www.faucet-pipeline.org](https://www.faucet-pipeline.org)

It is deployed automatically via Netlify.

## Contributing

* ensure [Node](http://nodejs.org) is installed
* `npm install` downloads dependencies
* `npm run compile` generates the site at `dist/site`
* `npm start` automatically recompiles while monitoring code changes - the site
is available at http://localhost:8000
* `npm test` checks code for stylistic consistency
You need Ruby & Node, then run:

* `bundle`
* `npm i`
* `bundle exec bridgetown start` (or `just start`)
* and you are good to go!

## Deploy

If you have `just` installed, run `just deploy`.
If not, run it manually:

* `bundle exec bridgetown clean`
* `bundle exec bridgetown frontend:build`
* `bundle exec bridgetown build`
* `rsync -uvcr --delete output/ $TARGET`
35 changes: 35 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
require "bridgetown"

Bridgetown.load_tasks

# Run rake without specifying any command to execute a deploy build by default.
task default: :deploy

desc "Build the Bridgetown site for deployment"
task :deploy => [:clean, "frontend:build"] do
Bridgetown::Commands::Build.start
end

desc "Build the site in a test environment"
task :test do
ENV["BRIDGETOWN_ENV"] = "test"
Bridgetown::Commands::Build.start
end

desc "Runs the clean command"
task :clean do
Bridgetown::Commands::Clean.start
end

namespace :frontend do
desc "Build the frontend with esbuild for deployment"
task :build do
sh "npm run esbuild"
end

desc "Watch the frontend with esbuild during development"
task :dev do
sh "npm run esbuild-dev"
rescue Interrupt
end
end
7 changes: 7 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file is used by Rack-based servers during the Bridgetown boot process.

require "bridgetown-core/rack/boot"

Bridgetown::Rack.boot

run RodaApp.freeze.app # see server/roda_app.rb
Loading