forked from whitefusionhq/bulmatown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53396d8
commit 57ca5aa
Showing
25 changed files
with
459 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
require "bridgetown" | ||
|
||
Bridgetown.load_tasks | ||
|
||
# Run rake without specifying any command to execute a deploy build by default. | ||
task default: :deploy | ||
|
||
# | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.