tailwindcss 0.2.0 → 1.0.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 +5 -5
- data/Gemfile.lock +22 -22
- data/README.md +24 -58
- data/lib/generators/tailwindcss/install_generator.rb +10 -10
- data/lib/generators/templates/tailwind.css +3 -62
- data/lib/tailwindcss/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: bc01fe3094b2bed39b343eba8d4601af791f1074a384294a257317f81717fc98
|
|
4
|
+
data.tar.gz: beff6604fa03cb609a680dd4a757c606d1bcb1033fc3044687abaea587677e4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00bcaeefd15c5ec1e47a7e38e36ae910efcad7f841f52c68ebc106dd94f5e52d0647857b352890b75bf477cb69f158070f83fb94c504f1da9e2912669eac60f1
|
|
7
|
+
data.tar.gz: 06340550e8b2eea74b2a43e473976f9222ccc89bfc61504ca81592af994b4ba9b3787e1cd93356bd662d5cea024645e49bafc0daa1d7c01855de365fefe8fc78
|
data/Gemfile.lock
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
tailwindcss (0.
|
|
4
|
+
tailwindcss (1.0.0)
|
|
5
5
|
railties (>= 4.1.0, < 6.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
actionpack (5.2.
|
|
11
|
-
actionview (= 5.2.
|
|
12
|
-
activesupport (= 5.2.
|
|
10
|
+
actionpack (5.2.3)
|
|
11
|
+
actionview (= 5.2.3)
|
|
12
|
+
activesupport (= 5.2.3)
|
|
13
13
|
rack (~> 2.0)
|
|
14
14
|
rack-test (>= 0.6.3)
|
|
15
15
|
rails-dom-testing (~> 2.0)
|
|
16
16
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
17
|
-
actionview (5.2.
|
|
18
|
-
activesupport (= 5.2.
|
|
17
|
+
actionview (5.2.3)
|
|
18
|
+
activesupport (= 5.2.3)
|
|
19
19
|
builder (~> 3.1)
|
|
20
20
|
erubi (~> 1.4)
|
|
21
21
|
rails-dom-testing (~> 2.0)
|
|
22
22
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
23
|
-
activesupport (5.2.
|
|
23
|
+
activesupport (5.2.3)
|
|
24
24
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
25
25
|
i18n (>= 0.7, < 2)
|
|
26
26
|
minitest (~> 5.1)
|
|
27
27
|
tzinfo (~> 1.1)
|
|
28
28
|
builder (3.2.3)
|
|
29
|
-
concurrent-ruby (1.
|
|
29
|
+
concurrent-ruby (1.1.5)
|
|
30
30
|
crass (1.0.4)
|
|
31
31
|
diff-lcs (1.3)
|
|
32
|
-
erubi (1.
|
|
33
|
-
i18n (1.0
|
|
32
|
+
erubi (1.8.0)
|
|
33
|
+
i18n (1.6.0)
|
|
34
34
|
concurrent-ruby (~> 1.0)
|
|
35
|
-
loofah (2.2.
|
|
35
|
+
loofah (2.2.3)
|
|
36
36
|
crass (~> 1.0.2)
|
|
37
37
|
nokogiri (>= 1.5.9)
|
|
38
|
-
method_source (0.9.
|
|
39
|
-
mini_portile2 (2.
|
|
38
|
+
method_source (0.9.2)
|
|
39
|
+
mini_portile2 (2.4.0)
|
|
40
40
|
minitest (5.11.3)
|
|
41
|
-
nokogiri (1.
|
|
42
|
-
mini_portile2 (~> 2.
|
|
43
|
-
rack (2.0.
|
|
41
|
+
nokogiri (1.10.3)
|
|
42
|
+
mini_portile2 (~> 2.4.0)
|
|
43
|
+
rack (2.0.7)
|
|
44
44
|
rack-test (1.1.0)
|
|
45
45
|
rack (>= 1.0, < 3)
|
|
46
46
|
rails-dom-testing (2.0.3)
|
|
@@ -48,12 +48,12 @@ GEM
|
|
|
48
48
|
nokogiri (>= 1.6)
|
|
49
49
|
rails-html-sanitizer (1.0.4)
|
|
50
50
|
loofah (~> 2.2, >= 2.2.2)
|
|
51
|
-
railties (5.2.
|
|
52
|
-
actionpack (= 5.2.
|
|
53
|
-
activesupport (= 5.2.
|
|
51
|
+
railties (5.2.3)
|
|
52
|
+
actionpack (= 5.2.3)
|
|
53
|
+
activesupport (= 5.2.3)
|
|
54
54
|
method_source
|
|
55
55
|
rake (>= 0.8.7)
|
|
56
|
-
thor (>= 0.
|
|
56
|
+
thor (>= 0.19.0, < 2.0)
|
|
57
57
|
rake (10.5.0)
|
|
58
58
|
rspec (3.7.0)
|
|
59
59
|
rspec-core (~> 3.7.0)
|
|
@@ -68,7 +68,7 @@ GEM
|
|
|
68
68
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
69
69
|
rspec-support (~> 3.7.0)
|
|
70
70
|
rspec-support (3.7.1)
|
|
71
|
-
thor (0.20.
|
|
71
|
+
thor (0.20.3)
|
|
72
72
|
thread_safe (0.3.6)
|
|
73
73
|
tzinfo (1.2.5)
|
|
74
74
|
thread_safe (~> 0.1)
|
|
@@ -83,4 +83,4 @@ DEPENDENCIES
|
|
|
83
83
|
tailwindcss!
|
|
84
84
|
|
|
85
85
|
BUNDLED WITH
|
|
86
|
-
1.
|
|
86
|
+
1.17.2
|
data/README.md
CHANGED
|
@@ -19,63 +19,26 @@ In order to run the install generator from `tailwindcss` you need to add the [we
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
#### Installing webpacker
|
|
22
|
+
#### Installing webpacker + tailwindcss
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
tailwindcss-rails ~> 1.0.0 supports Rails ~>5.2.0 and tailwindcss ~> 1.0
|
|
25
|
+
|
|
26
|
+
You first need to add the following gems to your `Gemfile`:
|
|
25
27
|
|
|
26
28
|
```
|
|
27
29
|
# Gemfile
|
|
28
|
-
gem 'webpacker', '~>
|
|
29
|
-
|
|
30
|
-
# OR if you prefer to use master
|
|
31
|
-
gem 'webpacker', git: 'https://github.com/rails/webpacker.git'
|
|
32
|
-
yarn add https://github.com/rails/webpacker.git
|
|
33
|
-
|
|
34
|
-
# OR to try out 4.x pre-release
|
|
35
|
-
gem 'webpacker', '>= 4.0.x'
|
|
36
|
-
yarn add @rails/webpacker@4.0.0-pre.2
|
|
30
|
+
gem 'webpacker', '~> 4.0.0'
|
|
31
|
+
gem 'tailwindcss', '~> 1.0.0'
|
|
37
32
|
```
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
Run the following:
|
|
40
35
|
|
|
41
|
-
```
|
|
36
|
+
```shell
|
|
42
37
|
bundle
|
|
43
|
-
bundle exec rails webpacker:install
|
|
44
|
-
|
|
45
|
-
# OR (on rails version < 5.0)
|
|
46
|
-
bundle exec rake webpacker:install
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
**You are now ready to add the tailwindcss gem**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
#### Installing Tailwind CSS
|
|
56
|
-
|
|
57
|
-
You need to include the `tailwindcss` gem inside your `Gemfile`:
|
|
58
|
-
|
|
59
|
-
```ruby
|
|
60
|
-
gem 'tailwindcss'
|
|
61
|
-
```
|
|
62
38
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```ruby
|
|
66
|
-
gem 'tailwindcss', git: 'https://github.com/IcaliaLabs/tailwindcss-rails.git'
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Install the gem by running the bundle command:
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
$ bundle
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
After running the `bundle` command, you can now run the installer.
|
|
39
|
+
bundle exec rails webpacker:install
|
|
76
40
|
|
|
77
|
-
|
|
78
|
-
$ rails g tailwindcss:install
|
|
41
|
+
bundle exec rails g tailwindcss:install
|
|
79
42
|
```
|
|
80
43
|
|
|
81
44
|
This will prepare the application to use tailwind by:
|
|
@@ -84,26 +47,29 @@ This will prepare the application to use tailwind by:
|
|
|
84
47
|
2. Create a `javascript/css` directory
|
|
85
48
|
3. Init tailwind from the `node_modules`
|
|
86
49
|
4. Setup tailwind
|
|
87
|
-
5. Configure
|
|
50
|
+
5. Configure `postcss.config.js` file
|
|
88
51
|
|
|
89
|
-
If you want to know how this is
|
|
52
|
+
If you want to know how this is achieved, you can go [here](https://github.com/IcaliaLabs/tailwindcss-rails/blob/master/lib/generators/tailwindcss/install_generator.rb).
|
|
90
53
|
|
|
91
|
-
|
|
54
|
+
These two lines will compile the assets from the `app/javascript/css` folder.
|
|
92
55
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
56
|
+
You must add the following to your `config/initializers/content_security_policy.rb`:
|
|
57
|
+
```ruby
|
|
58
|
+
Rails.application.config.content_security_policy do |policy|
|
|
59
|
+
policy.connect_src :self, :https, 'http://localhost:3035', 'ws://localhost:3035' if Rails.env.development?
|
|
60
|
+
end
|
|
96
61
|
```
|
|
97
62
|
|
|
98
|
-
|
|
63
|
+
Inside of `config/webpacker.yml`, you must set `extract_css: true` default is `false`.
|
|
99
64
|
|
|
100
|
-
|
|
65
|
+
You have to add these two lines to your `application` layout in order to compile it.
|
|
101
66
|
|
|
102
|
-
```
|
|
103
|
-
|
|
67
|
+
```ruby
|
|
68
|
+
<%= stylesheet_pack_tag 'application' %>
|
|
69
|
+
<%= javascript_pack_tag 'application' %>
|
|
104
70
|
```
|
|
105
71
|
|
|
106
|
-
|
|
72
|
+
Webpacker will automatically compile your assets while a `bundle exec rails s` is active.
|
|
107
73
|
|
|
108
74
|
## Contributing
|
|
109
75
|
|
|
@@ -8,26 +8,26 @@ module Tailwindcss
|
|
|
8
8
|
source_root File.expand_path("../../templates", __FILE__)
|
|
9
9
|
|
|
10
10
|
def yarn_add_tailwindcss
|
|
11
|
-
run "yarn --ignore-engines add tailwindcss"
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def create_javascript_css_directory
|
|
15
|
-
run "mkdir app/javascript/css"
|
|
11
|
+
run "yarn --ignore-engines add tailwindcss@1.0.0 --tilde"
|
|
16
12
|
end
|
|
17
13
|
|
|
18
14
|
def init_tailwindcss
|
|
19
|
-
run "./node_modules/.bin/tailwind init
|
|
15
|
+
run "./node_modules/.bin/tailwind init ./tailwind.config.js"
|
|
20
16
|
end
|
|
21
17
|
|
|
22
18
|
def setup_tailwindcss
|
|
23
|
-
template "tailwind.css", "app/javascript/css/
|
|
24
|
-
append_to_file "app/javascript/packs/application.js", 'import "../css/
|
|
19
|
+
template "tailwind.css", "app/javascript/css/application.css"
|
|
20
|
+
append_to_file "app/javascript/packs/application.js", 'import "../css/application.css"'
|
|
25
21
|
end
|
|
26
22
|
|
|
27
23
|
def configure_postcssrc
|
|
28
|
-
inject_into_file "
|
|
24
|
+
inject_into_file "postcss.config.js", " require('tailwindcss'),\n", after: "require('postcss-import'),\n"
|
|
25
|
+
inject_into_file "postcss.config.js", " require('autoprefixer'),\n", after: "plugins: [\n"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def remove_corejs_3
|
|
29
|
+
gsub_file "babel.config.js", /regenerator: true,\n corejs: 3/, "regenerator: true,"
|
|
29
30
|
end
|
|
30
31
|
end
|
|
31
32
|
end
|
|
32
33
|
end
|
|
33
|
-
|
|
@@ -1,62 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
* You can see the styles here:
|
|
6
|
-
* https://github.com/tailwindcss/tailwindcss/blob/master/css/preflight.css
|
|
7
|
-
*
|
|
8
|
-
* If using `postcss-import`, use this import instead:
|
|
9
|
-
*
|
|
10
|
-
* @import "tailwindcss/preflight";
|
|
11
|
-
*/
|
|
12
|
-
@tailwind preflight;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* This injects any component classes registered by plugins.
|
|
16
|
-
*
|
|
17
|
-
* If using `postcss-import`, use this import instead:
|
|
18
|
-
*
|
|
19
|
-
* @import "tailwindcss/components";
|
|
20
|
-
*/
|
|
21
|
-
@tailwind components;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Here you would add any of your custom component classes; stuff that you'd
|
|
25
|
-
* want loaded *before* the utilities so that the utilities could still
|
|
26
|
-
* override them.
|
|
27
|
-
*
|
|
28
|
-
* Example:
|
|
29
|
-
*
|
|
30
|
-
* .btn { ... }
|
|
31
|
-
* .form-input { ... }
|
|
32
|
-
*
|
|
33
|
-
* Or if using a preprocessor or `postcss-import`:
|
|
34
|
-
*
|
|
35
|
-
* @import "components/buttons";
|
|
36
|
-
* @import "components/forms";
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* This injects all of Tailwind's utility classes, generated based on your
|
|
41
|
-
* config file.
|
|
42
|
-
*
|
|
43
|
-
* If using `postcss-import`, use this import instead:
|
|
44
|
-
*
|
|
45
|
-
* @import "tailwindcss/utilities";
|
|
46
|
-
*/
|
|
47
|
-
@tailwind utilities;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Here you would add any custom utilities you need that don't come out of the
|
|
51
|
-
* box with Tailwind.
|
|
52
|
-
*
|
|
53
|
-
* Example :
|
|
54
|
-
*
|
|
55
|
-
* .bg-pattern-graph-paper { ... }
|
|
56
|
-
* .skew-45 { ... }
|
|
57
|
-
*
|
|
58
|
-
* Or if using a preprocessor or `postcss-import`:
|
|
59
|
-
*
|
|
60
|
-
* @import "utilities/background-patterns";
|
|
61
|
-
* @import "utilities/skew-transforms";
|
|
62
|
-
*/
|
|
1
|
+
@import "tailwindcss/base";
|
|
2
|
+
@import "tailwindcss/components";
|
|
3
|
+
@import "tailwindcss/utilities";
|
data/lib/tailwindcss/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tailwindcss
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Abraham Kuri
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-05-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -116,8 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
117
|
version: '0'
|
|
118
118
|
requirements: []
|
|
119
|
-
|
|
120
|
-
rubygems_version: 2.5.2
|
|
119
|
+
rubygems_version: 3.0.3
|
|
121
120
|
signing_key:
|
|
122
121
|
specification_version: 4
|
|
123
122
|
summary: Tailwind CSS Rails Integration + Webpacker
|