-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce a stylesheet_base generator #767
Conversation
@@ -1,6 +1,7 @@ | |||
require 'suspenders/version' | |||
require 'suspenders/generators/app_generator' | |||
require 'suspenders/generators/static_generator' | |||
require 'suspenders/generators/stylesheet_base_generator' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
This looks very happy to me. ❤️ 🚢 |
|
||
module Suspenders | ||
class StylesheetBaseGenerator < Rails::Generators::Base | ||
source_root File.expand_path( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of keeping the style consistent and re-write this as:
source_root(
File_expand_path("..", "..", "..", templates),
File.dirname(__FILE__),
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything about this line annoys me. Is there a better way to do this?
OK so the status of this seems to be:
@tute @teoljungberg Are these things that should be fixed in this PR? |
If we know of a better way we improve it yes, but if not, it shouldn't hold off this PR I think.
Around this your previous last comment said:
I'm ok with that workaround. But there is a bug right now:
|
I agree with @tute that that can be left for a future PR. |
1e2436d
to
b450d9b
Compare
Aha! I had missed that. Obvious now. Thanks, fixed. Now the build is failing because of changes to the gem ecosystem. We should fix |
I just saw this and this seems like a great addition. Thanks @mike-burns. |
b450d9b
to
5c611ff
Compare
This introduces the `suspenders:stylesheet_base` generator, which adds our typical foundations for CSS. In this case it is Bourbon, Neat, and Refills. Of note, the `application.scss` must list the imports in a specific order, and this removes the `application.css`.
5c611ff
to
3625422
Compare
I haven't had chance to properly delve into this new generator, but are you guys getting the following when bundling? It's because the refills gem is already in the development/test block in the Gemfile while the new generator appends it again to the bottom of the file...
|
@rikkipitt I'm not seeing that. Attaching a sample mkdir tmp && cd tmp
../suspenders/bin/suspenders sample |
@mike-burns Looks like someone else has found this to be the case too in #786 |
This introduces the
suspenders:stylesheet_base
generator, which addsour typical foundations for CSS. In this case it is Bourbon, Neat, and
Refills.
Of note, the
application.scss
must list the imports in a specificorder.
Paired with Justin Moore.