bullet_train-themes-light 1.0.17 → 1.0.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af3bd83c524618c1e2af49fb0c4510c926a84ab527d6a88250d5a4fe3c298301
4
- data.tar.gz: f71167e71cb143c81596a2399f380c1c47fb239ff5bb7cd12050e26e453dc017
3
+ metadata.gz: ce02b721661492cb0ba4916e87466ac0381adb3142ea3da1226fec4527bfd4c2
4
+ data.tar.gz: 9b69e69f69f24d322a47931c64681bdaca89362922e53d7feaacf4906eb86b02
5
5
  SHA512:
6
- metadata.gz: 1b63d73ecb854a1a40c634a0e0d658ba205a16b022a66187db59352e3726a34660900740cb9e23d221cd7e5a9460319851a838d587f4db4f553c8c07c1dbc7cc
7
- data.tar.gz: 6fa79adde7523e4caabde4f72d53175d75ce699279e3ee294c964ba9e83646dcdf4e81c7d1a9b359e91135e4b3faeb9b85ed967f49198b9b9460426358f3a0a3
6
+ metadata.gz: 3bde40fadcb848f8cc2c557bed56f39dbeed2e016898e1680baccdbac4fe4644bf673a96abee5c327bc0de80cdfb830c8b42ed968755a939f269217e3802f4cf
7
+ data.tar.gz: cb17c2356330035ef0c343d9404337507259f0d137e70459838c1f81878bff0bd84f09d2beca3b2456c2199002bbd189f2b2f83572bee903abc00d129f77d9c4
@@ -14,5 +14,5 @@
14
14
  </div>
15
15
 
16
16
  <div class="mb-4">
17
- <%= render "themes/light/line" %>
17
+ <%= render "shared/line" %>
18
18
  </div>
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html class="theme-<%= BulletTrain::Themes::Light.color %>">
3
3
  <head>
4
- <%= render 'themes/light/layouts/head' %>
4
+ <%= render 'shared/layouts/head' %>
5
5
  </head>
6
6
  <body class="bg-light-gradient text-gray-700 text-sm font-normal dark:bg-dark-gradient dark:text-darkPrimary-300">
7
7
  <div class="p-4 bg-primary-900 electron-draggable electron-title-bar hidden electron-mobile-only"></div>
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html class="theme-<%= BulletTrain::Themes::Light.color %>">
3
3
  <head>
4
- <%= render 'themes/light/layouts/head' %>
4
+ <%= render 'shared/layouts/head' %>
5
5
  </head>
6
6
  <body class="bg-light-gradient text-gray-700 text-sm font-normal electron-draggable dark:bg-dark-gradient dark:text-darkPrimary-300">
7
7
  <div data-turbo="false">
@@ -1,7 +1,7 @@
1
1
  module BulletTrain
2
2
  module Themes
3
3
  module Light
4
- VERSION = "1.0.17"
4
+ VERSION = "1.0.21"
5
5
  end
6
6
  end
7
7
  end
@@ -1,4 +1,52 @@
1
- # desc "Explaining what the task does"
2
- # task :bullet_train_themes_light do
3
- # # Task goes here
4
- # end
1
+ namespace :bullet_train do
2
+ namespace :themes do
3
+ namespace :light do
4
+ desc "Fork the \"Light\" theme into your local repository."
5
+ task :eject, [:destination] => :environment do |task, args|
6
+ theme_base_path = `bundle show --paths bullet_train-themes-light`.chomp
7
+ puts "Ejecting from Light theme in `#{theme_base_path}`."
8
+
9
+ puts "Ejecting Tailwind configuration into `./tailwind.#{args[:destination]}.config.js`."
10
+ `cp #{theme_base_path}/tailwind.light.config.js #{Rails.root}/tailwind.#{args[:destination]}.config.js`
11
+
12
+ puts "Ejecting stylesheets into `./app/assets/stylesheets/#{args[:destination]}`."
13
+ `mkdir #{Rails.root}/app/assets/stylesheets`
14
+ `cp -R #{theme_base_path}/app/assets/stylesheets/light #{Rails.root}/app/assets/stylesheets/#{args[:destination]}`
15
+ `cp -R #{theme_base_path}/app/assets/stylesheets/light.tailwind.css #{Rails.root}/app/assets/stylesheets/#{args[:destination]}.tailwind.css`
16
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/light/#{args[:destination]}/g" #{Rails.root}/app/assets/stylesheets/#{args[:destination]}.tailwind.css`
17
+
18
+ puts "Ejecting JavaScript into `./app/javascript/application.#{args[:destination]}.js`."
19
+ `cp #{theme_base_path}/app/javascript/application.light.js #{Rails.root}/app/javascript/application.#{args[:destination]}.js`
20
+
21
+ puts "Ejecting all theme partials into `./app/views/themes/#{args[:destination]}`."
22
+ `mkdir #{Rails.root}/app/views/themes`
23
+ `cp -R #{theme_base_path}/app/views/themes/light #{Rails.root}/app/views/themes/#{args[:destination]}`
24
+
25
+ puts "Cutting local `Procfile.dev` over from `light` to `#{args[:destination]}`."
26
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/light/#{args[:destination]}/g" #{Rails.root}/Procfile.dev`
27
+
28
+ puts "Cutting local `package.json` over from `light` to `#{args[:destination]}`."
29
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/light/#{args[:destination]}/g" #{Rails.root}/package.json`
30
+
31
+ # Stub out the class that represents this theme and establishes its inheritance structure.
32
+ target_path = "#{Rails.root}/app/lib/bullet_train/themes/#{args[:destination]}.rb"
33
+ puts "Stubbing out a class that represents this theme in `./#{target_path}`."
34
+ `mkdir -p #{Rails.root}/app/lib/bullet_train/themes`
35
+ `cp #{theme_base_path}/lib/bullet_train/themes/light.rb #{target_path}`
36
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/module Light/module #{args[:destination].titlecase}/g" #{target_path}`
37
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/TailwindCss/Light/g" #{target_path}`
38
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/light/#{args[:destination]}/g" #{target_path}`
39
+ ["require", "TODO", "mattr_accessor"].each do |thing_to_remove|
40
+ `grep -v #{thing_to_remove} #{target_path} > #{target_path}.tmp`
41
+ `mv #{target_path}.tmp #{target_path}`
42
+ end
43
+ `standardrb --fix #{target_path}`
44
+
45
+ puts "Cutting local project over from `light` to `#{args[:destination]}` in `app/helpers/application_helper.rb`."
46
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/:light/:#{args[:destination]}/g" #{Rails.root}/app/helpers/application_helper.rb`
47
+
48
+ puts "You must restart `bin/dev` at this point, because of the changes to `Procfile.dev` and `package.json`."
49
+ end
50
+ end
51
+ end
52
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-themes-light
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.17
4
+ version: 1.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-26 00:00:00.000000000 Z
11
+ date: 2022-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails