bullet_train-themes-light 1.0.19 → 1.0.22

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: cf9815b8be1121970e9cdef38ce613a3cd3e59fc49135fed1d4f298ed62dae37
4
- data.tar.gz: 45078a516aeb4d3b2179a63658054ea4a1e6ee5e955aca01e1c707fd5c923a19
3
+ metadata.gz: 34f10e6da7000e49343ea48f34436dff11e8dd9ba81657e87831fbdedca628b9
4
+ data.tar.gz: b2239440d0ff3677c34c629fcd0655628723928479178833cc539116fcc4aedd
5
5
  SHA512:
6
- metadata.gz: 5ba638cb69f69bfd1a3673c7d854447e7b0610392a08d941569f9fe6d0512683a5cfd6d21a5ef7d3fcd2a8a96cbe4baae3b6d66389f2ade7057cdf011f85bd47
7
- data.tar.gz: 34f1de87a9ba75309695cd1391073c111fa06c2a3eaaa2edec56038f666ce73f1cfc39ac017f579bf1a43ba8c3d7fee3ee915364d60a72e86c3dc9f9716f9bd9
6
+ metadata.gz: 46660b278af4ea2accc5530d89238894c99a4b0c09b9156e54f486db9f766d6c6b8b3ccb95d20a6731714b69468205c60c8006adc8654541a92b84732acdc106
7
+ data.tar.gz: 5b12616bd5af8e068c61624d5045f6a475c94ca67dd6d19793f2dd5359c2715e310e35ddb3e8be1d5ea087ca613566142a8f8845fe9a30df73b9512e3d529f2f
@@ -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.19"
4
+ VERSION = "1.0.22"
5
5
  end
6
6
  end
7
7
  end
@@ -1,4 +1,53 @@
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
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/light/#{args[:destination]}/g" #{Rails.root}/app/views/themes/#{args[:destination]}/layouts/_head.html.erb`
25
+
26
+ puts "Cutting local `Procfile.dev` over from `light` to `#{args[:destination]}`."
27
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/light/#{args[:destination]}/g" #{Rails.root}/Procfile.dev`
28
+
29
+ puts "Cutting local `package.json` over from `light` to `#{args[:destination]}`."
30
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/light/#{args[:destination]}/g" #{Rails.root}/package.json`
31
+
32
+ # Stub out the class that represents this theme and establishes its inheritance structure.
33
+ target_path = "#{Rails.root}/app/lib/bullet_train/themes/#{args[:destination]}.rb"
34
+ puts "Stubbing out a class that represents this theme in `./#{target_path}`."
35
+ `mkdir -p #{Rails.root}/app/lib/bullet_train/themes`
36
+ `cp #{theme_base_path}/lib/bullet_train/themes/light.rb #{target_path}`
37
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/module Light/module #{args[:destination].titlecase}/g" #{target_path}`
38
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/TailwindCss/Light/g" #{target_path}`
39
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/light/#{args[:destination]}/g" #{target_path}`
40
+ ["require", "TODO", "mattr_accessor"].each do |thing_to_remove|
41
+ `grep -v #{thing_to_remove} #{target_path} > #{target_path}.tmp`
42
+ `mv #{target_path}.tmp #{target_path}`
43
+ end
44
+ `standardrb --fix #{target_path}`
45
+
46
+ puts "Cutting local project over from `light` to `#{args[:destination]}` in `app/helpers/application_helper.rb`."
47
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/:light/:#{args[:destination]}/g" #{Rails.root}/app/helpers/application_helper.rb`
48
+
49
+ puts "You must restart `bin/dev` at this point, because of the changes to `Procfile.dev` and `package.json`."
50
+ end
51
+ end
52
+ end
53
+ 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.19
4
+ version: 1.0.22
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