[go: nahoru, domu]

Skip to content
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

As an OmbuLabs / FastRuby.io developer, I'd like to be able to pick which style guide to use in my new Rails application #1

Closed
etagwerker opened this issue Sep 15, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@etagwerker
Copy link
Member

Why

As a developer
I want to be able to pick the style guide
So that I can save time implementing it in my project

Acceptance Criteria

Scenario: 
Given that we have three style guides (no style guide (Rails's default), OmbuLabs, or FastRuby.io)
When I start creating a new Rails project
Then I want to be able to pick the style guide for my project

Notes:

It would be great if there is a little dialogue that is presented to the user or an option to pick the style guide.

For example:

rails new foo
> Which style guide do you want to use? (rails/fastruby/ombulabs -- default: ombulabs)
> fastruby
> Cool, using fastruby style guide for project foo.

Or:

rails new foo --styleguide=fastruby
> Cool, using fastruby style guide for project foo.
@etagwerker etagwerker added the enhancement New feature or request label Sep 15, 2020
@arielj arielj self-assigned this Sep 15, 2020
@arielj
Copy link
Contributor
arielj commented Sep 16, 2020

@etagwerker I run into an issue here with the fastruby styleguide, it's not prepared to work with the Webpacker gem (webpacker can't read js files from gems like sprocket does for the old assets pipeline). We don't have that problem with the ombulabs one cause the js on that one is only used in the gh-page of the styleguide, but the fastruby one includes the js needed for the carousel and also js from bootstrap and material design.

We first need to make the fastruby styleguide compatible with webpacker (maybe trying to remove external dependencies like jquery, bootstrap, material and bs.slider to make it easier)

@arielj
Copy link
Contributor
arielj commented Sep 16, 2020

Looks like doing something like rails new foo --styleguide=fastruby is not possible with the standard rails command and rails templates (the AppGenerator filters unknown arguments). We would have to override the default AppGenerator class to add that and wrap that with a custom command like suspenders does, but then we would be moving out from the rails conventions. Would it be ok to only support the first option? (asking which styleguide to use)

@arielj
Copy link
Contributor
arielj commented Sep 16, 2020

This is partially implemented (asking the user to choose between ombulabs styleguide or none).

@arielj arielj closed this as completed in 4475369 Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants