tailwindcss_merger 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 510d735c124dd43869384ae043cdba070934d95bc1e867adcaa5812dd21bccf4
4
- data.tar.gz: cd91bd57a754c4c8963cefec427c9bdc1e365b6a246203206604e765a758f02d
3
+ metadata.gz: def25504829bdeeb9ca4149a88a8d2ce05f4912585f615b8b7bdf8574686e26f
4
+ data.tar.gz: 18a3d667cb1935234bb9594b5a748f7bb9d98ba5ca208f1adcb78633a2efd18d
5
5
  SHA512:
6
- metadata.gz: 499b95641bacc5051746b233d4d5a54094ceac1dca7ef5f01159269a2a745a16c26ca74ca2476b4a5a21ccec4c1b70301788bc6ced6b4f71dc75c06c200d60c3
7
- data.tar.gz: b4530a55c79d4e0dee0820eb7145ecbc2afa84d064fde7591d07d030a0d7d4f03855a3d6704b87d987bf41a53a29aa67349e024dbf33d90f54c42cfd553b04fc
6
+ metadata.gz: 2ca911096e45134ba962a20406f068aa55b136b774f01d51ad0819c44306736c5b3cdf1f8f4195d34c3b8c9c6b58cd292ada7a91381b0aef8fb12a6e612cc9fc
7
+ data.tar.gz: d133441ce538ad6af794b0f3b3078ced717dd9c5f9d58aae26b5fef85e2467de20080ed54dfaee318958a9f8b44a5d054b3558baed24099241e8865b4ac8a88f
data/README.md CHANGED
@@ -15,7 +15,14 @@ Well, just follow this three easy steps:
15
15
  ├── app
16
16
  │ └── assets
17
17
  │ │ └── tailwindcss_stylesheets
18
+ │ │ │ └── buttons.css
19
+ │ │ │ └── tables.css
20
+ │ │ │ └── colors.css
21
+ │ │ │ └── typography.css
18
22
  ```
23
+ After this steps you can just run `bin/dev` or `rake tailwindcss:watch`
24
+
25
+ ![ezgif com-gif-maker](https://user-images.githubusercontent.com/49816584/155272801-7b644d22-5909-4bcf-a9fa-a08fcc87b77f.gif)
19
26
 
20
27
  ## Installation
21
28
 
@@ -43,6 +50,10 @@ Or install it yourself as:
43
50
  gem install tailwindcss_merger
44
51
  ```
45
52
 
53
+ # Warning
54
+
55
+ Please pay attention, that this gem overwrites your existing application.tailwind.css file and because of it before starting any tailwindcss rake task move styles to separate files, like: typography.css, buttons.css, tables.css and etc.
56
+
46
57
  ## Contributing
47
58
 
48
59
  For your applying your changes just create pull request with assigning to me.
data/Rakefile CHANGED
@@ -1,3 +1,2 @@
1
1
  require "bundler/setup"
2
-
3
2
  require "bundler/gem_tasks"
@@ -1,3 +1,3 @@
1
1
  module TailwindcssMerger
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,6 +1,4 @@
1
- # Loading tailwindcss-rails tasks
2
- tailwindcss_rails_path = Pathname.new("#{Gem.find_files('tailwindcss-rails.rb').first}").dirname
3
- load "#{tailwindcss_rails_path}/tasks/build.rake"
1
+ Tailwindcss::Engine.load_tasks
4
2
 
5
3
  namespace :csspacker do
6
4
  desc 'Packs all CSS files from app/assets/tailwindcss_stylesheets into app/assets/application.tailwind.css
@@ -17,6 +15,8 @@ namespace :csspacker do
17
15
 
18
16
  files.each do |file_path|
19
17
  File.open(file_path, 'r') do |file|
18
+ main_file.write("/* #{File.basename(file)} */\n")
19
+
20
20
  loop do
21
21
  main_file.write(file.readline)
22
22
  rescue StandardError
@@ -25,11 +25,12 @@ namespace :csspacker do
25
25
  end
26
26
  end
27
27
  end
28
- end
28
+
29
+ main_file
30
+ end.close
29
31
  end
30
32
 
31
33
  desc 'Runs tailwindcss:build on changes in directory app/assets/tailwindcss_stylesheets'
32
-
33
34
  task :watch do
34
35
  listen = Listen.to(Rails.root.join('app', 'assets', 'tailwindcss_stylesheets')) do
35
36
  Rake::Task['csspacker:build'].execute
@@ -40,4 +41,5 @@ namespace :csspacker do
40
41
  end
41
42
 
42
43
  Rake::Task['tailwindcss:build'].enhance(['csspacker:build'])
44
+ Rake::Task['tailwindcss:watch'].enhance(['csspacker:build'])
43
45
  Rake::Task['tailwindcss:watch'].enhance(['csspacker:watch'])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwindcss_merger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - loqimean
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-19 00:00:00.000000000 Z
11
+ date: 2022-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -66,6 +66,34 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: debug
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  description: Simple way for using to many files of styles with tailwindcss-rails gem
70
98
  or just tailwind. Make it easy.
71
99
  email: