bullet_train-themes-light 1.0.19 → 1.0.20
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b618c385969968cf23c4ca197ac329342a79a5d69c7cf54cb94770769d725bb
|
4
|
+
data.tar.gz: 10441e8958f53ca3b9c19295b3719519ff9d50fc56739be6523ae57275a6d1a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dd348d36fbfd662905c1a4021543bd106551cc9f28ea46cd1943e3bb1695347e101536fc537f54b4b4fed6925cedd50d3ddce05ace70e919dd209a45923613b
|
7
|
+
data.tar.gz: 8250d93ba50bafdc0960783c9414e8ad015ff5e3b93c4e6ad10f7b14b1facaf96d131ae92db8b621ef9abcb76c0b44b311ab6c1ea3cd4cf8ca0571a479b4d9e1
|
@@ -1,4 +1,52 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
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.
|
4
|
+
version: 1.0.20
|
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-
|
11
|
+
date: 2022-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|