tailwindcss 0.1.1 → 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
  SHA1:
3
- metadata.gz: 60afc6a39734562c5a1c4d62d618c8b1e5293230
4
- data.tar.gz: 98ede461ac34b50de1ea506371eb613e2426d517
3
+ metadata.gz: 89a0670927390550f8cfab2082b510ab6d8da7b2
4
+ data.tar.gz: 6fe7b71efa73ceb111a9e67769061ea223b33b08
5
5
  SHA512:
6
- metadata.gz: 51d58d858c38ecfb1af30a0a83d700084b7ced506a6b218824517eee0aa56d6b8c72950162bcf422b3d66e3ae01cb8e49b3aea198ba3d9bc241846b62022b199
7
- data.tar.gz: dbb833e4d4af9f6a46af115ecb29036e76a77faf01da62a050259a8ed497a4e60ffcfab6f37efe4ac520adb0cfe2857dce42ae2e508acc7b86c160a21604e30e
6
+ metadata.gz: a5207eb263ac5352a1ba35060970848c70a700306599e9aa0c3887298c754a2ab0f333390c6c514425d6a82fbbb091a6eb80a4bb77dfe78fab5d6526f55ae469
7
+ data.tar.gz: 81219bbd1171a96d4a3dd6812f114f4bfe9360181723cfc5ea51b2f8b47a587bc30242cae378d9117c5ef26171caaee551fe2cf1a5bf7ada15c3fe9e4f106118
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ .DS_Store
13
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.4
5
+ before_install: gem install bundler -v 1.16.2
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at kurenn@icalialabs.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in tailwindcss.gemspec
6
+ gemspec
@@ -0,0 +1,86 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ tailwindcss (0.1.3)
5
+ railties (>= 4.1.0, < 6.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionpack (5.2.0)
11
+ actionview (= 5.2.0)
12
+ activesupport (= 5.2.0)
13
+ rack (~> 2.0)
14
+ rack-test (>= 0.6.3)
15
+ rails-dom-testing (~> 2.0)
16
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
17
+ actionview (5.2.0)
18
+ activesupport (= 5.2.0)
19
+ builder (~> 3.1)
20
+ erubi (~> 1.4)
21
+ rails-dom-testing (~> 2.0)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
23
+ activesupport (5.2.0)
24
+ concurrent-ruby (~> 1.0, >= 1.0.2)
25
+ i18n (>= 0.7, < 2)
26
+ minitest (~> 5.1)
27
+ tzinfo (~> 1.1)
28
+ builder (3.2.3)
29
+ concurrent-ruby (1.0.5)
30
+ crass (1.0.4)
31
+ diff-lcs (1.3)
32
+ erubi (1.7.1)
33
+ i18n (1.0.1)
34
+ concurrent-ruby (~> 1.0)
35
+ loofah (2.2.2)
36
+ crass (~> 1.0.2)
37
+ nokogiri (>= 1.5.9)
38
+ method_source (0.9.0)
39
+ mini_portile2 (2.3.0)
40
+ minitest (5.11.3)
41
+ nokogiri (1.8.4)
42
+ mini_portile2 (~> 2.3.0)
43
+ rack (2.0.5)
44
+ rack-test (1.1.0)
45
+ rack (>= 1.0, < 3)
46
+ rails-dom-testing (2.0.3)
47
+ activesupport (>= 4.2.0)
48
+ nokogiri (>= 1.6)
49
+ rails-html-sanitizer (1.0.4)
50
+ loofah (~> 2.2, >= 2.2.2)
51
+ railties (5.2.0)
52
+ actionpack (= 5.2.0)
53
+ activesupport (= 5.2.0)
54
+ method_source
55
+ rake (>= 0.8.7)
56
+ thor (>= 0.18.1, < 2.0)
57
+ rake (10.5.0)
58
+ rspec (3.7.0)
59
+ rspec-core (~> 3.7.0)
60
+ rspec-expectations (~> 3.7.0)
61
+ rspec-mocks (~> 3.7.0)
62
+ rspec-core (3.7.1)
63
+ rspec-support (~> 3.7.0)
64
+ rspec-expectations (3.7.0)
65
+ diff-lcs (>= 1.2.0, < 2.0)
66
+ rspec-support (~> 3.7.0)
67
+ rspec-mocks (3.7.0)
68
+ diff-lcs (>= 1.2.0, < 2.0)
69
+ rspec-support (~> 3.7.0)
70
+ rspec-support (3.7.1)
71
+ thor (0.20.0)
72
+ thread_safe (0.3.6)
73
+ tzinfo (1.2.5)
74
+ thread_safe (~> 0.1)
75
+
76
+ PLATFORMS
77
+ ruby
78
+
79
+ DEPENDENCIES
80
+ bundler (~> 1.16)
81
+ rake (~> 10.0)
82
+ rspec (~> 3.0)
83
+ tailwindcss!
84
+
85
+ BUNDLED WITH
86
+ 1.16.2
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Abraham Kuri
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,118 @@
1
+ # Tailwind CSS Rails
2
+
3
+ The `tailwindcss` gem helps you to easily install the Tailwind CSS framework by using WebPack and the `webpacker` gem.
4
+
5
+
6
+
7
+ ## Table of contents
8
+
9
+ - [Installing the gem](#installing-the-gem)
10
+ - [Contributing](#contributing)
11
+ - [License](#license)
12
+ - [Code of conduct](code-of-conduct)
13
+
14
+
15
+
16
+ ## Installing the gem
17
+
18
+ In order to run the install generator from `tailwindcss` you need to add the [webpacker](https://github.com/rails/webpacker) gem, and run the installation setup for it.
19
+
20
+
21
+
22
+ #### Installing webpacker
23
+
24
+ You first need to add this to you `Gemfile`:
25
+
26
+ ```
27
+ # Gemfile
28
+ gem 'webpacker', '~> 3.5'
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
37
+ ```
38
+
39
+ Finally, run following to install Webpacker:
40
+
41
+ ```
42
+ 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
+
63
+ or you can install the latest build:
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.
76
+
77
+ ```console
78
+ $ rails g tailwindcss:install
79
+ ```
80
+
81
+ This will prepare the application to use tailwind by:
82
+
83
+ 1. Adding tailwind by using `yarn`
84
+ 2. Create a `javascript/css` directory
85
+ 3. Init tailwind from the `node_modules`
86
+ 4. Setup tailwind
87
+ 5. Configure `.postcssrc.yml` file
88
+
89
+ If you want to know how this is achieve, you can go [here](https://github.com/IcaliaLabs/tailwindcss-rails/blob/master/lib/generators/tailwindcss/install_generator.rb).
90
+
91
+ Lastly but not least, you have to add this two lines to your `application` layout in order to compile it.
92
+
93
+ ```
94
+ <%= stylesheet_pack_tag 'application' %>
95
+ <%= javascript_pack_tag 'application' %>
96
+ ```
97
+
98
+ This two lines will compile the assets from the `app/javascript/css` folder.
99
+
100
+ Don't forget to run the `webpacker` server like so:
101
+
102
+ ```
103
+ ./bin/webpack-dev-server
104
+ ```
105
+
106
+ This will lift a node server that will watch the changes on files and compile them.
107
+
108
+ ## Contributing
109
+
110
+ Bug reports and pull requests are welcome on GitHub at https://github.com/IcaliaLabs/tailwindcss-rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
111
+
112
+ ## License
113
+
114
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
115
+
116
+ ## Code of Conduct
117
+
118
+ Everyone interacting in the Tailwindcss project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tailwindcss/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "tailwindcss"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/generators/base'
4
+
5
+ module Tailwindcss
6
+ module Generators
7
+ class InstallGenerator < Rails::Generators::Base
8
+ source_root File.expand_path("../../templates", __FILE__)
9
+
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"
16
+ end
17
+
18
+ def init_tailwindcss
19
+ run "./node_modules/.bin/tailwind init app/javascript/css/tailwind.js"
20
+ end
21
+
22
+ def setup_tailwindcss
23
+ template "tailwind.css", "app/javascript/css/tailwind.css"
24
+ append_to_file "app/javascript/packs/application.js", 'import "../css/tailwind.css"'
25
+ end
26
+
27
+ def configure_postcssrc
28
+ inject_into_file "./.postcssrc.yml", "\n tailwindcss: './app/javascript/css/tailwind.js'", before: "postcss-cssnext: {}"
29
+ end
30
+ end
31
+ end
32
+ end
33
+
@@ -0,0 +1,62 @@
1
+ /**
2
+ * This injects Tailwind's base styles, which is a combination of
3
+ * Normalize.css and some additional base styles.
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
+ */
@@ -0,0 +1 @@
1
+ require "tailwindcss/version"
@@ -0,0 +1,3 @@
1
+ module Tailwindcss
2
+ VERSION = "0.2.0".freeze
3
+ end
@@ -0,0 +1,14 @@
1
+ require "bundler/setup"
2
+ require "tailwindcss"
3
+
4
+ RSpec.configure do |config|
5
+ # Enable flags like --only-failures and --next-failure
6
+ config.example_status_persistence_file_path = ".rspec_status"
7
+
8
+ # Disable RSpec exposing methods globally on `Module` and `main`
9
+ config.disable_monkey_patching!
10
+
11
+ config.expect_with :rspec do |c|
12
+ c.syntax = :expect
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ RSpec.describe Tailwindcss do
2
+ it "has a version number" do
3
+ expect(Tailwindcss::VERSION).not_to be nil
4
+ end
5
+
6
+ it "does something useful" do
7
+ expect(false).to eq(true)
8
+ end
9
+ end
@@ -0,0 +1,31 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # frozen_string_literal: true
3
+
4
+
5
+ lib = File.expand_path("../lib", __FILE__)
6
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
+ require "tailwindcss/version"
8
+
9
+ Gem::Specification.new do |spec|
10
+ spec.name = "tailwindcss"
11
+ spec.version = Tailwindcss::VERSION
12
+ spec.authors = ["Abraham Kuri"]
13
+ spec.email = ["kurenn@icalialabs.com"]
14
+
15
+ spec.summary = %q{ Tailwind CSS Rails Integration + Webpacker }
16
+ spec.description = %q{ Tailwind CSS Rails Integration + Webpacker }
17
+ spec.homepage = "https://github.com/IcaliaLabs/tailwindcss-rails"
18
+ spec.license = "MIT"
19
+
20
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
21
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
22
+
23
+ spec.files = `git ls-files`.split("\n")
24
+ spec.require_paths = ["lib"]
25
+
26
+ spec.add_development_dependency "bundler", "~> 1.16"
27
+ spec.add_development_dependency "rake", "~> 10.0"
28
+ spec.add_development_dependency "rspec", "~> 3.0"
29
+
30
+ spec.add_dependency("railties", ">= 4.1.0", "< 6.0")
31
+ end
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.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abraham Kuri
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-13 00:00:00.000000000 Z
11
+ date: 2018-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,13 +52,51 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: railties
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 4.1.0
62
+ - - "<"
63
+ - !ruby/object:Gem::Version
64
+ version: '6.0'
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 4.1.0
72
+ - - "<"
73
+ - !ruby/object:Gem::Version
74
+ version: '6.0'
55
75
  description: " Tailwind CSS Rails Integration + Webpacker "
56
76
  email:
57
77
  - kurenn@icalialabs.com
58
78
  executables: []
59
79
  extensions: []
60
80
  extra_rdoc_files: []
61
- files: []
81
+ files:
82
+ - ".gitignore"
83
+ - ".rspec"
84
+ - ".travis.yml"
85
+ - CODE_OF_CONDUCT.md
86
+ - Gemfile
87
+ - Gemfile.lock
88
+ - LICENSE.txt
89
+ - README.md
90
+ - Rakefile
91
+ - bin/console
92
+ - bin/setup
93
+ - lib/generators/tailwindcss/install_generator.rb
94
+ - lib/generators/templates/tailwind.css
95
+ - lib/tailwindcss.rb
96
+ - lib/tailwindcss/version.rb
97
+ - spec/spec_helper.rb
98
+ - spec/tailwindcss_spec.rb
99
+ - tailwindcss.gemspec
62
100
  homepage: https://github.com/IcaliaLabs/tailwindcss-rails
63
101
  licenses:
64
102
  - MIT