Skip to content

Commit

Permalink
Release Serbea and Serbea-Rails 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite committed Nov 12, 2021
1 parent 79f6ea1 commit 1ee3128
Show file tree
Hide file tree
Showing 21 changed files with 399 additions and 1,952 deletions.
5 changes: 3 additions & 2 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

gem "bridgetown", "~> 0.19"
gem "serbea", "~> 0.10", :group => :bridgetown_plugins
gem "bridgetown", "1.0.0.alpha9"

gem "puma", "~> 5.5"
49 changes: 49 additions & 0 deletions docs/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
require "bridgetown"

Bridgetown.load_tasks

#
# Standard set of tasks, which you can customize if you wish:
#
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 Webpack for deployment"
task :build do
sh "yarn run webpack-build"
end

desc "Watch the frontend with Webpack during development"
task :dev do
sh "yarn run webpack-dev --color"
rescue Interrupt
end
end

#
# Add your own Rake tasks here! You can use `environment` as a prerequisite
# in order to write automations or other commands requiring a loaded site.
#
# task :my_task => :environment do
# puts site.root_dir
# automation do
# say_status :rake, "I'm a Rake tast =) #{site.config.url}"
# end
# end

# Run rake without specifying any command to execute a deploy build by default.
task default: :deploy
29 changes: 29 additions & 0 deletions docs/bin/bridgetown
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'bridgetown' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("bridgetown-core", "bridgetown")
29 changes: 29 additions & 0 deletions docs/bin/bt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'bridgetown' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("bridgetown-core", "bridgetown")
7 changes: 7 additions & 0 deletions docs/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
27 changes: 27 additions & 0 deletions docs/config/puma.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Puma is a fast, concurrent web server for Ruby & Rack
#
# Learn more at: https://puma.io
#
port ENV.fetch("BRIDGETOWN_PORT") { 4000 }

# You can adjust the number of workers (separate processes) and threads
# (per process) based on your production system
#
if ENV["BRIDGETOWN_ENV"] == "production"
workers ENV.fetch("BRIDGETOWN_CONCURRENCY") { 4 }
end

max_threads_count = ENV.fetch("BRIDGETOWN_MAX_THREADS") { 5 }
min_threads_count = ENV.fetch("BRIDGETOWN_MIN_THREADS") { max_threads_count }
threads min_threads_count, max_threads_count

# Preload the application for maximum performance
#
preload_app!

# Use the Bridgetown logger format
#
require "bridgetown-core/rack/logger"
log_formatter do |msg|
Bridgetown::Rack::Logger.message_with_prefix msg
end
12 changes: 2 additions & 10 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@
"version": "1.0.0",
"private": true,
"scripts": {
"build": "bundle exec bridgetown build",
"serve": "bundle exec bridgetown serve",
"clean": "bundle exec bridgetown clean",
"webpack-build": "webpack --mode production",
"webpack-dev": "webpack --mode development -w",
"deploy": "yarn clean && yarn webpack-build && yarn build",
"sync": "node sync.js",
"start": "node start.js"
"webpack-dev": "webpack --mode development -w"
},
"devDependencies": {
"@babel/core": "^7.9.0",
Expand All @@ -19,12 +13,10 @@
"@babel/plugin-transform-runtime": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"babel-loader": "^8.1.0",
"browser-sync": "^2.26.7",
"concurrently": "^5.2.0",
"css-loader": "^3.4.2",
"file-loader": "^6.0.0",
"mini-css-extract-plugin": "^0.9.0",
"node-sass": "^4.13.1",
"sass": "^1.35.2",
"sass-loader": "^8.0.2",
"style-loader": "^1.1.3",
"webpack": "^4.42.1",
Expand Down
15 changes: 15 additions & 0 deletions docs/server/roda_app.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Roda is a simple Rack-based framework with a flexible architecture based
# on the concept of a routing tree. Bridgetown uses it for its development
# server, but you can also run it in production for fast, dynamic applications.
#
# Learn more at: http://roda.jeremyevans.net

class RodaApp < Bridgetown::Rack::Roda
# Add Roda configuration here if needed

route do
# Load all the files in server/routes
# see hello.rb.sample
Bridgetown::Rack::Routes.start! self
end
end
3 changes: 2 additions & 1 deletion docs/src/_components/head.liquid
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% capture page_title %}{{ title | strip_html | strip_newlines }}{% endcapture %}
<title>{% if page_title != "" %}{{ page_title | escape }} | {{ metadata.title | escape }}{% else %}{{ metadata.title | escape }}: {{ metadata.tagline | escape }}{% endif %}</title>
<title>{% if page_title != "Index" %}{{ page_title | escape }} | {{ metadata.title | escape }}{% else %}{{ metadata.title | escape }}: {{ metadata.tagline | escape }}{% endif %}</title>

<meta name="description" content="{{ metadata.description }}" />

<link rel="stylesheet" href="{% webpack_path css %}" />
<script src="{% webpack_path js %}" defer></script>
{% live_reload_dev_js %}
17 changes: 0 additions & 17 deletions docs/start.js

This file was deleted.

35 changes: 0 additions & 35 deletions docs/sync.js

This file was deleted.

Loading

0 comments on commit 1ee3128

Please sign in to comment.