diff options
Diffstat (limited to 'new/splash/bin')
-rwxr-xr-x | new/splash/bin/build.rb | 18 | ||||
-rwxr-xr-x | new/splash/bin/deploy.rb | 10 | ||||
-rwxr-xr-x | new/splash/bin/server.rb | 2 |
3 files changed, 22 insertions, 8 deletions
diff --git a/new/splash/bin/build.rb b/new/splash/bin/build.rb index 1439dd6f..e5e27ab8 100755 --- a/new/splash/bin/build.rb +++ b/new/splash/bin/build.rb @@ -4,16 +4,20 @@ require_relative '../lib/splash' require_relative '../../bin/builder' -builder_class = Crys::Splash::Builder output_dir = "#{File.dirname(File.dirname(__FILE__))}/output" -#file_path = "#{File.dirname(File.dirname(__FILE__))}/pages/#{@options[:filepath]}" image_dir = "#{File.dirname(File.dirname(File.expand_path(__FILE__)))}/assets/images" -file_path=@options[:filepath] +pages_db_path = "#{File.dirname(File.dirname(__FILE__))}/db/pages.yaml" +pages_db_manager = Crys::PagesDbManager.new(db_path: pages_db_path) + +file_path = @options[:filepath] +batch = file_path == :all + +builder = Crys::Splash::Builder.new(file_path: file_path, output_dir: output_dir, image_dir: image_dir, pages_db_manager: pages_db_manager) +batch_builder = Crys::BatchBuilder.new(pages_db_manager: pages_db_manager, output_dir: output_dir, image_dir: image_dir, builder_class: Crys::Splash::Builder) Crys::BuilderRunner.new( - file_path: file_path, - output_dir: output_dir, - builder_class: builder_class, - image_dir: image_dir + builder: builder, + batch_builder: batch_builder, + batch: batch ).run diff --git a/new/splash/bin/deploy.rb b/new/splash/bin/deploy.rb new file mode 100755 index 00000000..b7639053 --- /dev/null +++ b/new/splash/bin/deploy.rb @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require_relative '../lib/splash' +require_relative '../../bin/deployer' + +source = "#{File.dirname(File.dirname(File.expand_path(__FILE__)))}/output/" +dest = 'site-crys-splash' + +Crys::DeployerRunner.new(source: source, dest: dest).run diff --git a/new/splash/bin/server.rb b/new/splash/bin/server.rb index 15b34329..57e17a55 100755 --- a/new/splash/bin/server.rb +++ b/new/splash/bin/server.rb @@ -4,7 +4,7 @@ require_relative '../lib/splash' require_relative '../../bin/server' -server_class = Crys::Splash::Server +server_class = Crys::Server root = "#{File.dirname(File.dirname(__FILE__))}/output" Crys::ServerRunner.new(root: root, server_class: server_class, section: 'Splash Page').serve |