tailwindcss-rails 4.3.0.rc1 → 4.3.0.rc2

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: 20ce264a20dac62cd290726a18023d0d9981012d6160ec39c177978249e60598
4
- data.tar.gz: 1493673e3f6afa4651fe65bd14d5ea758bb76d672796907f3305f26c9fcd61d4
3
+ metadata.gz: e4349466378ac069e68a603d05be8858c4d43e6f9ea163282c5f3c61ae7102e5
4
+ data.tar.gz: 9534f15e382f31f110cf55c14765173651cc9e9274c9d4b8e3393f21a9858029
5
5
  SHA512:
6
- metadata.gz: f161431ed9e4c1fe1b89a72d3a29447b4ceb58846cf74562305437b4eb7b862b86bac45c4534ece4aeda954e905cc822feea70acdd53ada772ba0de4796e2193
7
- data.tar.gz: cbb6dc145179678acef43e56baca61250a27c30030376b798e0d61dbd68fb19d3fa30fae1bc6e0c031ec5722747c37d07aea04d3ad97da025726b9d115733c4a
6
+ metadata.gz: 66c2804f1ea83bbf15dbffd25898955b529acca26c8bc6d7a96c7cdec091bd3a2e966c4fc5cc7892b71eac6ab20498250112c49d360b79bfc733388b1597e060
7
+ data.tar.gz: c185d112a3e0c38ce346749eb9f98ba9660910b229719eca56d537e2d50c9c90a103d80315ba65554d41bbc1cb342810090a252dc7c8ffd93d38a2276bd0624a
data/README.md CHANGED
@@ -392,7 +392,7 @@ If you need to use a custom input or output file, you can run `bundle exec tailw
392
392
 
393
393
  _This feature is experimental and may change in the future. If you have feedback, please join the [discussion](https://github.com/rails/tailwindcss-rails/discussions/355)._
394
394
 
395
- If you have Rails Engines in your application that use Tailwind CSS and provide an `app/assets/tailwind/<engine_name>/engine.css` file, entry point files will be created for each of them in `app/assets/builds/tailwind/<engine_name>.css` so they can be included in your host application's Tailwind CSS by adding `@import "../builds/tailwind/<engine_name>"` to your `app/assets/tailwind/application.css` file.
395
+ If you have Rails Engines in your application that use Tailwind CSS and provide an `app/assets/tailwind/<engine_name>/engine.css` file, entry point files will be created for each of them in `app/assets/builds/tailwind/<engine_name>.css` on the first build/watch invocation or manual call for `rails tailwindcss:engines` so they can be included in your host application's Tailwind CSS by adding `@import "../builds/tailwind/<engine_name>"` to your `app/assets/tailwind/application.css` file.
396
396
 
397
397
  > [!IMPORTANT]
398
398
  > You must `@import` the engine CSS files in your `app/assets/tailwind/application.css` for the engine to be included in the build. By default, no engine CSS files are imported, and you must opt-in to using the file in your build.
@@ -15,9 +15,5 @@ module Tailwindcss
15
15
  config.app_generators do |g|
16
16
  g.template_engine :tailwindcss
17
17
  end
18
-
19
- config.after_initialize do
20
- Tailwindcss::Engines.bundle
21
- end
22
18
  end
23
19
  end
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "4.3.0.rc1"
2
+ VERSION = "4.3.0.rc2"
3
3
  end
data/lib/tasks/build.rake CHANGED
@@ -1,6 +1,6 @@
1
1
  namespace :tailwindcss do
2
2
  desc "Build your Tailwind CSS"
3
- task build: :environment do |_, args|
3
+ task build: [:environment, :engines] do |_, args|
4
4
  debug = args.extras.include?("debug")
5
5
  verbose = args.extras.include?("verbose")
6
6
 
@@ -12,7 +12,7 @@ namespace :tailwindcss do
12
12
  end
13
13
 
14
14
  desc "Watch and build your Tailwind CSS on file changes"
15
- task watch: :environment do |_, args|
15
+ task watch: [:environment, :engines] do |_, args|
16
16
  debug = args.extras.include?("debug")
17
17
  poll = args.extras.include?("poll")
18
18
  always = args.extras.include?("always")
@@ -26,6 +26,11 @@ namespace :tailwindcss do
26
26
  rescue Interrupt
27
27
  puts "Received interrupt, exiting tailwindcss:watch" if args.extras.include?("verbose")
28
28
  end
29
+
30
+ desc "Create Tailwind CSS entry point files for Rails Engines"
31
+ task engines: :environment do
32
+ Tailwindcss::Engines.bundle
33
+ end
29
34
  end
30
35
 
31
36
  Rake::Task["assets:precompile"].enhance(["tailwindcss:build"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwindcss-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.0.rc1
4
+ version: 4.3.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson