tailwindcss-rails-webpacker 0.1.0 → 0.1.2

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: 30d593306437e185c7a083f997b9033626d697832b0966e047634d9a66bfeb75
4
- data.tar.gz: f311e36446b9ccb068e75da6aa47c76c26f8b494b339e10e5f6b1de845d58465
3
+ metadata.gz: b194df1be2279bca5ff3bfc82ed7b9c6c391a53f52b8ff0c1f439f0c139b9529
4
+ data.tar.gz: 59314057129220441d9e2dc37d28e1dc8822ebfba228c36ee98c14045450d686
5
5
  SHA512:
6
- metadata.gz: d3d1e36e3c31710e7643647424ca6260496e3b5d3880ab6d882a026bd3aee7cf05a77c57a3df5771582e3772e2dccb029283f15ca75c91c2e4acbe18c1da564b
7
- data.tar.gz: eb01e0c14c81ad2eb635bb59043740e3d925fbfcfaf21e1f4095d848fdf0eb1b5e14be7d08020549cfccf88337476e835061c4ae73b9d7cafe2b7f6aa3ab5014
6
+ metadata.gz: bbf5fff36f7c7076ffe7ae97e343b8c106cdaf6e5f02edc6126899bcf5767beeb0d67cba665c58fa0241aaf78bf68adfb37d168072b5749ff1029ca902eb2091
7
+ data.tar.gz: 40c89d7a27b438c2311cc0ce504229c8bb7a5a55954fb269e9ba3476d93938821d0cd19836223978bc1b8e4a71c96ed00926b62b844d3536035d51c7b650d0e2
data/README.md CHANGED
@@ -12,6 +12,11 @@ This is extraction originally created inside the [tailwindcss-rails](https://git
12
12
  1. Run `./bin/bundle add tailwindcss-rails-webpacker`
13
13
  2. Run `./bin/rails tailwindcss:install`
14
14
 
15
+ ## Purging in production
16
+
17
+ The Tailwind CSS framework starts out as a massive file, which gives you all the combinations of utility classes for development, but you wouldn't want to ship all those unused classes in production.
18
+
19
+ This gem will automatically purge those unused classes in production.
15
20
 
16
21
  ## License
17
22
 
@@ -0,0 +1,19 @@
1
+ module.exports = {
2
+ // Purge unused TailwindCSS styles
3
+ purge: {
4
+ enabled: ["production"].includes(process.env.NODE_ENV),
5
+ content: [
6
+ './**/*.html.erb',
7
+ './app/helpers/**/*.rb',
8
+ './app/javascript/**/*.js',
9
+ ],
10
+ },
11
+ darkMode: 'media', // or 'media' or 'class'
12
+ theme: {
13
+ extend: {},
14
+ },
15
+ variants: {
16
+ extend: {},
17
+ },
18
+ plugins: [],
19
+ }
@@ -7,7 +7,6 @@ insert_into_file "#{Webpacker.config.source_entry_path}/application.js", "\nimpo
7
7
 
8
8
  say "Configuring Tailwind CSS"
9
9
  directory Pathname.new(__dir__).join("stylesheets"), Webpacker.config.source_path.join("stylesheets")
10
- Dir.chdir(WEBPACK_STYLESHEETS_PATH) { run "npx tailwindcss init" }
11
10
 
12
11
  insert_into_file "postcss.config.js", "require('tailwindcss')(\"./app/javascript/stylesheets/tailwind.config.js\"),\n ",
13
12
  before: "require('postcss-import')"
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwindcss-rails-webpacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dino Maric
@@ -36,6 +36,7 @@ files:
36
36
  - README.md
37
37
  - Rakefile
38
38
  - lib/install/stylesheets/application.scss
39
+ - lib/install/stylesheets/tailwind.config.js
39
40
  - lib/install/tailwindcss.rb
40
41
  - lib/tailwindcss-rails-webpacker.rb
41
42
  - lib/tailwindcss/engine.rb