Skip to content

Commit

Permalink
Modify suspenders:styles
Browse files Browse the repository at this point in the history
These modifications were not captured before merging the #1145,
presumably because of an issue with GitHub CLI.
  • Loading branch information
stevepolitodesign committed Nov 28, 2023
1 parent 1a03e95 commit ac15fd3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ Configures applications to use [PostCSS][] or [Tailwind][] via
[cssbundling-rails][]. Defaults to PostCSS with [modern-normalize][], with the
option to override via `--css=tailwind`.

Also creates a directory structure to store additional stylesheets if using
PostCSS.
Also creates additional stylesheets if using PostCSS.

`bin/rails g suspenders:styles --css[postcss:tailwind]`

Expand Down
3 changes: 1 addition & 2 deletions lib/generators/suspenders/styles_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class StylesGenerator < Rails::Generators::Base
Defaults to PostCSS with modern-normalize, with the option to override via
--css=tailwind.
Also creates a directory structure to store additional stylesheets if using
PostCSS.
Also creates additional stylesheets if using PostCSS.
TEXT

def add_cssbundling_rails_gem
Expand Down
9 changes: 4 additions & 5 deletions test/generators/suspenders/styles_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ class StylesGenerator::DefaultTest < Rails::Generators::TestCase
Defaults to PostCSS with modern-normalize, with the option to override via
--css=tailwind.
Also creates a directory structure to store additional stylesheets if using
PostCSS.
Also creates additional stylesheets if using PostCSS.
TEXT

assert_equal description, generator_class.desc
Expand Down Expand Up @@ -136,7 +135,7 @@ class StylesGenerator::TailwindTest < Rails::Generators::TestCase
assert_no_match(/add.*modern-normalize/, output)
end

test "does not create directory structure" do
test "does not create stylesheets" do
run_generator %w[--css=tailwind]

assert_no_file app_root("app/assets/stylesheets/base.css")
Expand Down Expand Up @@ -168,7 +167,7 @@ class StylesGenerator::PostCssTest < Rails::Generators::TestCase
setup :prepare_destination
teardown :restore_destination

test "installs normalize and imports style sheets" do
test "installs modern-normalize and imports stylesheets" do
output = run_generator %w[--css=postcss]
application_stylesheet = <<~TEXT
@import "modern-normalize";
Expand All @@ -184,7 +183,7 @@ class StylesGenerator::PostCssTest < Rails::Generators::TestCase
end
end

test "creates directory structure" do
test "creates stylesheets" do
run_generator

assert_file app_root("app/assets/stylesheets/base.css")
Expand Down

0 comments on commit ac15fd3

Please sign in to comment.